in reply to Simple formatting question for credit card number
And let's throw a substr solution into the mix as well :)
$n = "4744760012394122"; $r = substr($n,-4,4,"")." ".$r while $n ne ""; [download]