I want to add a space to some output after every 4th character until the end of the string. I tried:
$str = $rows[\'value\']; echo substr($str, 0, 4) . \'
one-liner:
$yourstring = "1234567890"; echo implode(" ", str_split($yourstring, 4))." ";
This should give you as output: 1234 5678 90
That's all :D