Example of how to convert a date to a number string: & nbsp; 19:15:58 to & nbsp; 20070112191558, $ s = '2017-01-12 & nbsp; 19:15:5 date and time is converted into a number string
Example: 19:15:58
Convert to 20070112191558
How can this be converted
------ Solution --------------------
$ S = '2017-01-12 19:15:58 ';
Echo date ("YmdHis", strtotime ($ s ));
------ Solution --------------------
Set the time zone. add date_default_timezone_set ('prc') to the first line ');
------ Solution --------------------
Date_default_timezone_set ('prc'); // Set the time zone to China.
------ Solution --------------------
select now()+0
------ Solution --------------------
$ T = str_replace "-", "", $ t );
$ T = str_replace "", "", $ t );
$ T = str_replace ":", "", $ t );
------ Solution --------------------
How about Wuhan Keke Information Technology Co. Ltd.
------ Solution --------------------
Date_default_timezone_set ('prc ');
$ S = '2017-01-12 19:15:58 ';
Echo date ('ymdhis ', strtotime ($ s ));
------ Solution --------------------
$s='2007-01-12 19:15:58';
preg_match_all('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$s,$mat);
$res="";
for($i=1;$i
$res .= join('',$mat[$i]);
}
echo $res;//20070112191558