Alice Wei wrote:
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: RE: Array Search Not Working?
> Date: Wed, 10 Mar 2010 11:21:26 -0500
I'm still a little foggy on what you're doing, but doing, but does this
help?
$from = explode("-", $from);
$state_colors = explode("-", $state_colors);
$change = explode("-", $change);
$old = array_combine($from, $state_colors);
$new = array_combine($from, $change);
//show all values
foreach($old as $key => $val) {
echo "{$key} old={$old[$key]} new={$new[$key]}<br />\n";
}
//lookup a particular value
$test = "Muskogee, OK";
echo "TEST={$test} old={$old[$test]} new={$new[$test]}<br />\n";
/*
I'm proud to be an Okie from Muskogee,
A place where even squares can have a ball
We still wave Old Glory down at the courthouse,
And white lightnin's still the biggest thrill of all
*/
--
Thanks!
-Shawn
http://www.spidean.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php