Supponendo che il testo sia nella variabile $testo
Codice PHP:
for($i=0;$i<=$tot;$i++) {
  echo 
$testo[$i];