Thanks for that... found this piece of code in the function list on php.net.
<?
$s="blah0blah";
$si=0;
$s_len=strlen($s);
for ($si=0;$si<$s_len;$si++)
{
$c=$s[$si];
echo $si;
}
?>
Presumably what thats doing is using $s as the text, $si as the starting number, $s_len to count the string length and then using the for statement to check that it's not less that zero.
Changing the code to this allows for correct counting... however it writes the number of letters for each letter.... is there anyway I can use this in the code?
<?
$s="blah0blah";
$si=0;
$s_len=strlen($s);
for ($si=0;$si<$s_len;$si++)
{
$c=$s[$si];
echo $s_len;
}
?>
Since the result returned is 999999999 which is the correct number but that wouldn't work in code unless you used echo $si which counts up to the last letter - 012345678 - I can't think of a way of using it in code.
Thanks in advance,
Chris