I am trying to work out a string comparison, whereby a field from a database result set, if it is "This String" and compares to a hardwritten text line, needs to be changed to "ThisS".
include("db.php");
$query=do_query("SELECT * FROM clubs WHERE clubcode LIKE 'This%'");
setlocale (LC_COLLATE, 'en-US');
while($info=mysql_fetch_assoc($query))
{
$var1="".$info['clubcode']."";
$var2="This String";
echo strcoll($var1,$var2);
}
I am expecting 0 as the result from the strcoll() function, yet I get -1, even when the strings outputted are "This String"...
Needless to say I am confused.... any help / ideas ?