communication
 databases
 directories
 file handling
 html and code
 image editing
 image listing
 sessions and co
 string handling
 information
 forms
 apple stuff
 image handling
 array handling
 lixlpixel
php - snippets
google search terms detected and highlighted.
remove highlighting | keep highlighting
make snippet in "information" - download "date and time" - open demo of "date and time"
 search
php - snippets

Valid CSS!

php webring logo
prev next
random list
join the Ring!

information - date and time was created/last modified on Sat 13 Mar 2004 8:43 AM

<?php
   
echo date("D M d, Y H:i:s");
  
?>
  
  reads like: Fri Jan 03, 2003 12:01:21
  
  where
  
  Y = Year eg. 2003
  y = Year eg. 03
  M = Month eg. Jan
  m = Month eg. 01
  D = Day eg. Fri
  d = Day eg. 03
  z = Day of the year eg. 002
  H = Hours in 24 hour format eg. 07
  h = Hours in 12 hour format eg. 7
  i = Minutes eg. 29
  s = Seconds eg. 28
  U = Seconds since epoch eg. 1041604168

if you want some letters in the output, which are NOT to parse, escape them with a backslash like

<?php
   
echo date("D M d, Y H \hou\r\s i \m\i\\nu\\te\s s \seco\\n\d\s");
  
?>
  
  reads like: Fri Jan 03, 2003 12 hours 01 minutes 21 seconds
    

learn more about some of the PHP functions used in this snippet: date, echo, for, min

view the GNU general license - view the GNU library license - search on PHPsnippets - see your code like this

 a lixlpixel.com site

PHParadise.com - PHP-classes.org - your site on safari