PHP

Display date from MySql database using PHP

  
  • Favourite
Average Star Rating is 3 from the Total 3 Ratings


Copy and try this code in phpfiddle and press run.

<?php
     $date_val ="2018-08-23 10:30:45";
?>

<input name="datedepart" type="date" value="<?php echo date('Y-m-d',strtotime($date_val)) ?>" />

 

Display date from MySQL using PHP


Be the first to make a comment!