PHP Variable in MySQL db
Posted: Tue Mar 29, 2005 7:49 am
I've a row from a db :
$row = mysql_fetch_assoc($res);
$row['something'] contains The number is $var
If $var is set to 5 in the php page I want
echo $row['something']; to output - The number is 5
I tried entering The number is {$var} in the db but no luck.
exec cannot be used here I guess.
I know this has been posted many times here - Just dont know what search terms to give.
Thanks
$row = mysql_fetch_assoc($res);
$row['something'] contains The number is $var
If $var is set to 5 in the php page I want
echo $row['something']; to output - The number is 5
I tried entering The number is {$var} in the db but no luck.
exec cannot be used here I guess.
I know this has been posted many times here - Just dont know what search terms to give.
Thanks