Sample string : '123456' convert it into '12 34 56'
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following example.
<?php $str= '123456'; echo substr(chunk_split($str, 2, ' '), 0, -1)."\n"; ?>
04 August 2019 2227 Written By: Rohit
© 2020 Tech Study. All rights reserved | Developed by Tech Study| Privacy Policy | Sitemap