True enough, however, there are still some of us using
stone tablets for our correspondence :)
rm
--- Jørg_Vidar_Bryne <[EMAIL PROTECTED]> wrote:
> Or you could use this in php4:
>
> if ( in_array( "something", $temparray )) { do
> stuff }
>
> -J
Or you could use this in php4:
if ( in_array( "something", $temparray )) { do stuff }
-J
- Original Message -
From: "rm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 10, 2001 4:54 PM
Subject: Re: [PHP] some array help :)
>
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 somethingyou might
try
for ($i=0; $i < count($temparray); $i++){
if ($temparray[$i] == "something"){
do whatever this and that;
}
}
rm
--- Gregor
Its a function.
in php4, easy: http://php.net/manual/en/function.in-array.php
there will be an example for php 3 as well.
At 11:36 AM 3/10/2001 +0100, you wrote:
>hello,
>
>i'm trying to do something like
>
>$tmparray = array("foo", "foo1", "foo2");
>if ($i in $tmparray) then do something
>..
>
4 matches
Mail list logo