Re: Mystery foreach error
| From: | Angela Barone | Date: | Tue, 12 Mar 2013 21:51:59 +0000 |
| Subject: | Re: Mystery foreach error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320500@lists.php.net to get a copy of this message | ||
On Mar 12, 2013, at 2:26 PM, Marco Behnke wrote:
> what is in $states?
> Looks like $states[$state] is not an array.
Here's a sample:
<?php
$states = array(
'AL' => array( '350','351','352','353', ),
'AK' => array(
'995','996','997','998','999', ),
'AZ' => array(
'850','851','852','853','854', ),
...
'WI' => array( '530','531','532', ),
'WY' => array(
'820','821','822','823','824', ),
);
?>
> side effects if you don't act carefully with it.
I don't remember where that came from, but for the most part, this script works perfectly.
However, I removed it and will test without it.
Angela