is there any simple way to format the date in php? -
is there function format kind of '5/1/2011'
date '2011,1,5'
in php
you can via regular expression:
$new_str = preg_replace('#(\d+)/(\d+)/(\d+)#', '$3,$2,$1', $str);
is there function format kind of '5/1/2011'
date '2011,1,5'
in php
you can via regular expression:
$new_str = preg_replace('#(\d+)/(\d+)/(\d+)#', '$3,$2,$1', $str);
Comments
Post a Comment