You are here: finding value in multidimensional array « PHP Language « IT news, forums, messages
finding value in multidimensional array

Posted by Jeff on 08/31/07 21:46

php 5.x

In my php I define an multidimensional array like this:
$test = array(array(1, 0 , 3), array('aa', 'dd', 'cc'));

I need to seach the first array ( array(1, 0 , 3) ) of $test for a value...

The first array ( array(1, 0 , 3) ) get it's values from using mt_rand to
generate random values. I want these integer values to be unique... so I
need to perform an if-test on the genereated number - if number already
exist then generate another number and check that one too, until a unique
number is generated

I'm not sure how to do it so please if you have any suggestions on how to it
then please post your suggestion here

Jeff

 

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

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