Reply to Re: How to avoid in_array() function.

Your name:

Reply:


Posted by Chung Leong on 12/04/05 18:31

The hash table was invented precisely to solve this sort of problem.

Example:

$first=range("a","z");
$second=range("a","z");
$third=range("a","z");
$all_hash=array();

foreach ($first as $f){
foreach ($second as $s){
foreach ($third as $t){
$all_hash[$f.$s.$t] = true;
}
}
}
$all_arr = array_keys($all_hash);

[Back to original 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

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