Is there a way to add a space between numbers and letters in PHP?
Turn these:
14junee Parade
174kinglake 7612Jonh
7612jonh abcde
to
14 junee Parade
174 kinglake 7612 Jonh
7612 jonh abcde
try this, check the live demo.
echo preg_replace('/(\d+)/', '${1} ', '174kinglake 7612Jonh');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With