How does strtotime treat arrays? Yes. to submit a form, replace the time in date format with the timestamp. Previously, strtotime & nbsp; was used directly, but because the form needs to be clicked to add rows as needed, now all fields are converted into arrays, for example, & lt; td & gt; & lt; input & nbsp; typetext & nbsp; namedate [] & nbsp; how does style strtotime treat arrays?
In this case, when submitting a form, replace the time in date format with the timestamp. Previously, strtotime was used directly, but because the form needs to be clicked to add rows as needed, now all fields are converted into arrays, for example:
A js plug-in is used to directly select the time. arrays are not used in the past, as follows:
After the date field is added, [] is changed to date [], which is based on the array post,
Processing page, if not an array, directly
$date =strtotime($_post[date])
You can directly convert it into a timestamp, but now it is an array. if you use:
$date_arr =strtotime($_post[date])
An error is reported, but the database cannot be inserted. how can this problem be solved?
Time stamp strtotime array
------ Solution --------------------
$ Date_arr = array_map ('strtotime', $ _ POST ['Date']);