Posted by Chung Leong on 02/25/06 04:27
Jim Carlock wrote:
> And again back to the question in the topic... "Lowercase Versus
> Mixed-case" words inside the array that holds the states and state
> abbreviations. Anyone here that knows of a better way to do this?
> Another array might get created, as the list of targeted cities is over
> 100 right at the moment. To possibly identify each city to a proper
> state.
Just have the static array be in mixed case, then generate the other
one(s) programmatically:
$states = array(
"AL" => "Alabama",
...
"WY" => "Wyoming"
);
$state_hash = array_flip(array_map('strtolower', $states));
[Back to original message]
|