PHP Snippets

Name:Date Format
Description: Different date format you could use.

Code below...
> <?php

  
//Returns: 03.15.05
  
$date date("m.d.y");
  echo 
$date;
 
  
//Returns: November 29th 2005
  
$date date("F jS Y");
  echo 
$date;

  
//Returns: Friday 25 May 2005
  
$date date("l d F Y");
  echo 
$date;

  
//Returns: Wednesday June 29th 2005 5:27pm
  
$date date("l F jS Y g:ia");
  echo 
$date;

  
//More date format at:
  //http://www.php.net/manual/en/function.date.php

?>

« Back to PHP Snippets

Home | Site Map | Privacy Policy | Advertising | Contact Us
Copyright © 2006-2014 r2xDesign.net - All Rights Reserved.
eXTReMe Tracker