I got this error syntax error, unexpected 'for' T_FOR for a function that uses a for loop. However, I can't point out what's the mistake. All the semicolons and variables are in place supposedly
function uname_syntax($uname)
{
$alphacount = 0
for ($i = 0, $n = strlen($uname); $i < $n; $i++)
{
if(!ctype_alpha($uname[$i]))
{
if(!is_numeric($uname[$i]))
{
if($uname[$i] != '_')
{
return false;
}
}
}
else
{
$alphacount++;
}
}
if($alphacount == 0)
{
return false;
}
return true;
}