5
I am counting the characters of a string in PHP. The content of the string is: 10,12,12,22,33. I want to percolate to print one by one and with an " n". The problem is that I use strlen, and it counts all characters including commas. I wanted to count a character only after the comma. The code I used:
$max= strlen($positionY); // 6
for($i=0; $i<$max; $i++){
fwrite($hndl, $positionY[$i]);
fwrite($hndl, "\n");
}
Using Split solves your problem?
– CesarMiguel
Replace and remove the commas
– Pablo Tondolo de Vargas