Re: adding a space every 4 chars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Justin French wrote:
Hi,

What's the quickest way to add a space every four characters?

Eg 123456789 becomes 1234 5678 9

<?php $a = '123456789'; echo implode(' ', str_split($a, 4)); ?>

Greg

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux