Re: Evaluate PHP var in stored sql statement?
| From: | Matt | Date: | Fri, 24 Jan 2003 18:54:20 +0000 |
| Subject: | Re: Evaluate PHP var in stored sql statement? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133027@lists.php.net to get a copy of this message | ||
> From: "Noah" <noah@newminddesign.com>
> To: <maxim@php.net>
> Sent: Friday, January 24, 2003 4:39 PM
> Subject: Re: [PHP] Evaluate PHP var in stored sql statement?
> eval("\$myrow[2] = \"$myrow[2]\";");
>
> What's the deal with the leading backslash in ' eval("\$myrow[2] '?
It's escaping the $ so you keep the literal on the left hand side of the
expression.