RE: [PHP-WIN] eval function
| From: | Robert Nürnberg | Date: | Wed, 26 Feb 2003 06:57:45 +0000 |
| Subject: | RE: [PHP-WIN] eval function | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18707@lists.php.net to get a copy of this message | ||
Why use eval in the first place? $_POST["ADDRESS_ID_".$numb] will work,
as will $_POST["ADDRESS_ID_{$numb}"].
-----Original Message-----
From: Kevin Smith [mailto:kevin@netsmith.ltd.uk]
Sent: Wednesday, February 26, 2003 1:00 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] eval function
Hi All,
Does anyone know why this won't work?
I'm trying to retrieve the contents of a $_POST name dynamically
depending on a unique value as below.
// Works great
$_POST['ADDRESS_ID_1']
// Does work. But shows a blank value, no errors.
$numb=1;
eval("\$_POST['ADDRESS_ID_".$numb."'];");
Any ideas?
Thanks,
Kevin
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php