> getdate() in php ~ Online tutorial

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


Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: