> Online tutorial : getdate() in php
Showing posts with label getdate() in php. Show all posts
Showing posts with label getdate() in php. Show all posts

getdate() in php

getdate() function returns an array that contains date and time information for unix system
the returning array contain ten elements with relevant information needed when formatting a date

  • [seconds]-seconds
  • [minutes]-minutes
  • [hours]-hours
  • [mday]-day of month
  • [wday]-day of week
  • [year]-year
  • [yday]-day of year
  • [weekday]-name of the weekday
  • [month]-name of the month
Syntax
getdate(timestamp)
Program


<?php
$today=getdate(date("U"));
print("$today[weekday],today[month]],today[mday],today[year]");
?>

Output