Forum Moderators: coopster
I am getting the following error code on my blogging system:
Parse error: parse error, unexpected T_LNUMBER in /formatting.php on line 90
Here is the code I have for that formatting.php script:
function seems_utf8($Str) { # by bmorel at ssi dot fr
for ($i=0; $i<strlen($Str); $i++) {
if (ord($Str[$i]) 0x80) continue; # 0bbbbbbb // this is line 90!
elseif ((ord($Str[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb
elseif ((ord($Str[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb
elseif ((ord($Str[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb
elseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb
elseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b
else return false; # Does not match any model
for ($j=0; $j$n; $j++) { # n bytes matching 10bbbbbb follow?
if ((++$i == strlen($Str)) ¦¦ ((ord($Str[$i]) & 0xC0)!= 0x80))
return false;
}
}
return true;
}
Do you happen to see where my syntax error in the code is located?
Thanks in advance,
Christian
for ($j=0; $j$n; $j++) { # n bytes matching 10bbbbbb follow?
It's looking to me like that entire bit of code I sent out is a bit hacked by the person that created it!