跳至正文

如何将PHP日期字符串从 Y/m/d 转换为 Y-m-d

$date_array = explode("/","16/06/2012");
$new_date = $date_array[0]."-".$date_array[1]."-".$date_array[2];
标签: