You are here: Re: Array Storage: Lowercase Versus Mixed-case [Topic was: Removing Bad Words] « PHP Programming Language « IT news, forums, messages
Re: Array Storage: Lowercase Versus Mixed-case [Topic was: Removing Bad Words]

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));

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация