php-general | 2005051
Date: 05/15/05
- Next message: blackwater dev: "Re: [PHP] what am I missing..interpolation?"
- Previous message: blackwater dev: "[PHP] what am I missing..interpolation?"
- In reply to: blackwater dev: "[PHP] what am I missing..interpolation?"
- Next in thread: Krid: "Re: [PHP] what am I missing..interpolation?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 15/05/05, blackwater dev <blackwaterdev <email protected>> 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?
Not exactly sure if this will work, but try
echo eval($string)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: blackwater dev: "Re: [PHP] what am I missing..interpolation?"
- Previous message: blackwater dev: "[PHP] what am I missing..interpolation?"
- In reply to: blackwater dev: "[PHP] what am I missing..interpolation?"
- Next in thread: Krid: "Re: [PHP] what am I missing..interpolation?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

