RE: [PHP] *OK, more eval for today
| From: | Ford, Mike [LSS] | Date: | Thu, 19 Dec 2002 11:41:03 +0000 |
| Subject: | RE: [PHP] *OK, more eval for today | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-128847@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Alexey Lysenkov [mailto:man@xtati.com]
> Sent: 18 December 2002 19:08
>
>
> I am trying to do this:
>
> $tempVar1 = '\$HTTP_POST_VARS[\"q4_'.$i.'"]';
> eval("\$tempVar1=\"$tempVar1\";");
>
Well, you have the answer right there in front of you -- why not just take the statement you build
and eval(), and write it directly in the PHP thus:
$tempVar1 = $HTTP_POST_VARS['q4_'.$i];
or
$tempVar1 = $HTTP_POST_VARS["q4_$i"];
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211