php - how to replace date format in a dynamic string variable? -


my variable dynamic string variable in string have date value , looks like

$var = 'bd','100','10-05-2013','20-05-2013','alise'; 

but want change date format like

$var = 'bd','100','2013-05-10','2013-05-20','alise'; 

my variable dynamic date position , number of dates not fixed.

thanks

i recommend using strtotime (see http://php.net/manual/en/function.strtotime.php). can iterate on var (explode if need) , check whether false returned. else meaningful date/date time , timestamp.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -