Re: some array help :)

From: Date: Sat, 10 Mar 2001 15:54:40 +0000
Subject: Re: some array help :)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43316@lists.php.net to get a copy of this message
I'm not exactly sure of what you're doing, however, if you're trying to find a match to an element of an array and if there's a match do something....you might try.... for ($i=0; $i < count($temparray); $i++){ if ($temparray[$i] == "something"){ do whatever this and that; } } rm --- Gregor Jaksa <gre-gor@delphi-si.com> wrote: > hello, > > i'm trying to do something like > > $tmparray = array("foo", "foo1", "foo2"); > if ($i in $tmparray) then do something > .. > but i dont know how to do it. > any help would be appriciated > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribe@lists.php.net > For additional commands, e-mail: > php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/

« previous php.general (#43316) next »