in what way did the previous responses not answer this?

if you really want a loop then foreach($arrLoginName as $element) or for($x
= 0; $x < sizeof($arrLoginName); $x++) will do, but why not just use
if(in_array())? Are you really holding all of your user names in a single
"@" delimited string?

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Rol [mailto:[EMAIL PROTECTED]]
> Sent: 07 March 2001 19:09
> To: [EMAIL PROTECTED]
> Subject: explode question
> 
> 
> Hello again,
> 
> I'd better explain better.
> 
> I have logon screen Header("WWW-Authenticate: Basic 
> realm=\"whatever\"");
> where I would like the compare the user name $PHP_AUTH_USER 
> with the one in
> my database
> All names  like Mike or mike are @ seperated strings
> 
> How can I check the names from this array $arrLoginName = explode("@",
> $row->usr_loginName)
> 
> and return true if  a name in the var $arrLoginName == $PHP_AUTH_USER
> 
> How can I construct a loop which stops and returns true if a 
> match is found?
> 
> Any hints would be great.
> 
> Many thanks
> 
> Roland
> 
> 
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to