MySQL datetime format using PHP

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <?php
  2. // Source:
  3. // populates $datetime with a valid MySQL DATETIME value
  4. $datetime = date('Y-m-d H:i:s');

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.