Reputation: 147
I either get a one digit or a two digit number from my database like 52,8,4,99 etc. What i want to do now is to display the number with a space in between if the number is two digit like "5 2". How do i do this?
Upvotes: 0
Views: 1188
Reputation: 48284
I believe this will do what you want:
echo join(' ', str_split($number));
Upvotes: 3