You can use in_array (http://www.php.net/function.in_array) for this.
--
Mattias
--|-Original Message-
--|From: Narciso Miguel Rodrigues
--|[mailto:[EMAIL PROTECTED]]
--|Sent: Wednesday, February 05, 2003 02:03
--|To: [EMAIL PROTECTED]
--|Subject: [PHP] Array find a element
> Is possible to do something like
>
> if ($username in $users) ... or i need to do a foreach($user){...}
www.php.net/in_array
www.php.net/array_search
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP Genera
Is possible to do something like
if ($username in $users) ... or i need to do a foreach($user){...}
Thks
[MsR]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
3 matches
Mail list logo