PHP date function

Some useful date hacks

  1. Display only date when receiving full datetime type from MySQL
echo date('Y-m-d',strtotime($mysql_datetime));

2. Add or subtract x days or months to a date.

link

Leave a Reply

Your email address will not be published. Required fields are marked *