[PHP] what am I missing..interpolation?

2005-05-15 Thread blackwater dev
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

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread Justin Gruenberg
On 15/05/05, blackwater dev [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();

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread blackwater dev
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 [EMAIL PROTECTED] wrote: Hi! Try eval(echo $string); blackwater dev wrote: Hello, this works

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread Krid
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;

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread Evert | Rooftop
Shouldn't that be: eval(echo \$string\); its pretty insecure though, be sure your users are not allowed to change the db field, because they can do some serious damage. grt, Evert Krid wrote: Hi! Try eval(echo $string); blackwater dev wrote: Hello, this works fine: $name=fido; $string=my dog's

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread Marek Kilimajer
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

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread Richard Lynch
On Sun, May 15, 2005 8:27 am, blackwater dev said: 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 [EMAIL PROTECTED] wrote: Hi! Try eval(echo