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

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -