Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是 $fdate 变量,其中包含格式(dd-MY)中的日期,所以我如何将它们分别存储到三个变量中......
$fdate = $_POST['fdate'];
你可以这样做
如果格式像 dd-MY
$newdate=explode("-",$fdate); $day=$newdate[0]; $month=$newdate[1]; $year=$newdate[2];
如果您遇到任何问题,请告诉我。
if its in format (dd-m-y) then use list($date,$month,$year)=explode('-',$fdate);