since below the $f="y"; does NOT pass by anyway but rather pass initial $f="n"; for any value in text field ?
How a var in for loop[and this in a function] done global var ?
<?php
...
$f="n";
function check_username($username){
for ($j=0;$j<$count;$j++) {
$rowajax = @mysql_fetch_assoc($resultajax);
if (strtolower($rowajax['email']) == strtolower($username)) {
$f = "y";
break;
}
$f="y";
}
}
echo check_username($username); // after this the $f=is always="n"; the $f="y"; do not get done
...
?>
Is there any other way interupt a loop except"
break; ???

New Topic/Question
Reply




MultiQuote



|