Thursday, August 5, 2010

How to separate a string using explode in php

ex:
$st= explode('-', date('Y-m-d',strtotime('2010-01-01')));
result:
Array
(
[0] => 2010
[1] => 01
[2] => 01
)

No comments:

Post a Comment