Re[2]: [PHP] Comparing string to array
| From: | Richard Davey | Date: | Tue, 19 Jun 2007 12:38:43 +0000 |
| Subject: | Re[2]: [PHP] Comparing string to array | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257392@lists.php.net to get a copy of this message | ||
Hi Stut,
Tuesday, June 19, 2007, 1:16:54 PM, you wrote:
>> The problem is finding a way to expand the input name (which is a
>> string) into a format that $_POST can be searched for. Or do the
>> reverse, iterate through $_POST to find a match for the input name and
>> get that value.
> Try this overly commented snippet on for size...
> http://dev.stut.net/php/davey.php
Very nice, thank you. I was hoping there would be a way to do it
without resorting to eval(), but if even you can't figure out how, I'm
not going to waste any more time trying to either :)
I loved this part:
// The target - offensive American spelling!
:)
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"