Strtotime treats arrays how to deal with

Source: Internet
Author: User
What about Strtotime treats arrays?
That is, a form of the submission, to the date format of the time, the time stamp, used to be directly resolved with strtotime, but because the form needs to click to add rows as needed, now all the fields have become an array, for example:


With a JS plug-in, directly select the time, before the way the array, for:


is to add [] to the date[after the field date, so that is the array post,
Process the page, if not an array, directly

You can turn it directly into a timestamp, but now it becomes an array, if you use it directly:

will be error, can not insert the database, how to solve it? time Stamp Strtotime Array


------Solution--------------------
$date _arr = Array_map (' strtotime ', $_post[' date ');
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.