You are here: Re: [PHP] what am I missing..interpolation? « PHP « IT news, forums, messages
Re: [PHP] what am I missing..interpolation?

Posted by Justin Gruenberg on 05/15/05 17:04

On 15/05/05, blackwater dev <blackwaterdev@gmail.com> 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)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация