<? $text="123\n456\n123"; $a=explode("\n",$text); for($i=0;$i<count($a);$i++) printf("%03d\t$a[$i]<br>",$i); ?>
,$i
,$i+1