<?php $string = '99999999999999'; for($i=strlen($string); $i>0; $i-=4) $string=substr_replace($string, ' ', $i, 0); echo $string;
Standard input is empty
99 9999 9999 9999
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!