Re: adding a space every 4 chars

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

 



On 13/11/2004, at 12:20 AM, Jason Wong wrote:

No idea whether it's the quickest (in terms of cpu time):

    $doo = '123456789';
    $dah = preg_replace('/(\d{4})/', '\\1 ', $doo);
    echo $dah;

Quickest for me is more about lines of code and simplicity, so, thanks!!

Justin

--
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