strotime for french date

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

The date format is dd/mm/YYYY but you can replace slashes by anything else.

Copy this code and paste it in your HTML
  1. <?php
  2. $date = '25/02/2011';
  3. $date = implode('-', array_reverse(explode('/', $date)));
  4. $time = strtotime($date);
  5. ?>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.