Re[2]: [PHP] Comparing string to array

From: Date: Tue, 19 Jun 2007 09:03:46 +0000
Subject: Re[2]: [PHP] Comparing string to array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-257376@lists.php.net to get a copy of this message
Hi Larry, Tuesday, June 19, 2007, 2:55:07 AM, you wrote: > Perhaps you're looking for in_array()? If only it was that simple! But pray tell how an in_array search is going to find: $userparam = "test['bob'][]"; within: Array ( [test] => Array ( ['bob'] => Array ( [0] => red [1] => green [2] => blue ) ) ) ? The problem is that $userparam in the example above needs to be expanded out into a form that $_POST can be searched for it. Or vica versa. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window"

« previous php.general (#257376) next »