"/>"/> "/>">
Home > Article > Backend Development > Convert PHP timestamp to element with input type datetime in HTML5
For HTML5 input time, in PHP:
echo date("Y-m-d\TH:i:s");
The output is:
2018-28-03T19:12:49
The HTML with timestamp is:
<input type="datetime" value="<?php echo date("Y-m-d\TH:i:s",$timestamp); ?>"/>
The above is the detailed content of Convert PHP timestamp to element with input type datetime in HTML5. For more information, please follow other related articles on the PHP Chinese website!