help me split chars w/o spaces by 2... like: 2004

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

 



Help me split chars w/o spaces by 2... like: 2004
How can i make it?

first: 20
second: 04

Im working on this..

##### begin code
$year_split = date("Y");
$chars = preg_split('//', $year_split, -1, PREG_SPLIT_NO_EMPTY);
##### end code

But it splits the whole "2004" string..

Array
(
    [0] => 2
    [1] => 0
    [2] => 0
    [3] => 4
)


-- 
Louie Miranda
http://www.axishift.com

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