Re: Variable question
| From: | CC Zona | Date: | Mon, 07 May 2001 20:24:32 +0000 |
| Subject: | Re: Variable question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51821@lists.php.net to get a copy of this message | ||
In article
<D887D52AE0BEFA459B5ED84F8A45DFE501D0B5@adminex00.superior.k12.wi.us>,
KingJ@superior.k12.wi.us ("King, Justin") wrote:
> A simple eval($mysqldata) isn't going to do it though since the string
> is "Your username is $userdata["username"]"; it'll just spit a parse
> error. I've already tried that
The code being eval'd has to be a valid PHP statement. So if you want to
echo that string, then "echo" must be part of the eval'd code. Terminated
with semi-colon, etc.
eval("echo 'Your username is ' . $userdata['username'];");
--
CC