yyyymmdd to yyyy-mm-dd php

118

$var = '20/04/2012';
$date = str_replace('/', '-', $var);
echo date('Y-m-d', strtotime($date));

Comments

Submit
0 Comments