I am counting the characters of a string in PHP. The content of the string is: 10,12,12,22,33. I want to scroll to print one by one and with a "\ n". The problem is that I use strlen, and it counts all the characters including the commas. I wanted to count a character just after the comma. The code I used:
$max= strlen($positionY); // 6
for($i=0; $i<$max; $i++){
fwrite($hndl, $positionY[$i]);
fwrite($hndl, "\n");
}