Re: what am I missing..interpolation?

From: Date: Sun, 15 May 2005 15:27:22 +0000
Subject: Re: what am I missing..interpolation?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-215256@lists.php.net to get a copy of this message
Thanks for the info but I tried it both ways and get this error: Parse error: parse error, unexpected T_FOR, expecting ',' or ';' in dogs.php(11) : eval()'d code on line 1 On 5/15/05, Krid <krid@php.net> wrote: > 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! > > >

« previous php.general (#215256) next »