There is a string posted from a web page form : Jul 21 2015
. It represents a date but needs to be formatted. How to format it to be 2015-07-21
?
$string = "Jul 21 2015";
$time = date("Y-m-j", strtotime($string));
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments