[PHP] Re: Array Elements & While Loops

2001-10-01 Thread TURPIN Jean Max
Hi. Don't forget to increment j : > //loop to check for bad email addresses: > $j = 0; > $flag = 0; > while ($j < count($User)){ > if > (($User[$j]!="")&&!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$", > $User[$j])) > { > $flag = 1; > $errorNo = $j + 1; > } >$j

[PHP] Re: Array Elements & While Loops

2001-10-01 Thread Tom Churm
hi, _lallous: i've tried it with "==" and it still doesn't work: code for the valid variables is executed before my die() function is called. thanks, though, tom _lallous wrote: > > > if ($flag = 1) { > > die ("Email #$errorNo is not a valid e-mail > > should be: > > if ($flag == 1) //

[PHP] Re: Array Elements & While Loops

2001-10-01 Thread _lallous
> if ($flag = 1) { > die ("Email #$errorNo is not a valid e-mail should be: if ($flag == 1) // notice the double-equal signs "Tom Churm" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi, > > my problem is this: i'm using a while loop to check elements