Re: what am I missing..interpolation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!
Try
eval("echo $string");

blackwater dev wrote:
Hello,

this works fine:

$name="fido";
$string="my dog's name is $name";
echo $string;//prints my dog's name is fido

but when I store the string "my dog's name is $name" in the db and pull it out:

//do the query
$row=$datab->fetch();
$name="fido";
$string=$name['db_column'];
echo $string//prints my dog's name is $name

How can I get it to work with the db?

Thanks!


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux