how to get server date and time?

Answer Posted / amol

By Using function Date in php

Definition and Usage

The getdate() function returns an array that contains date
and time information for a Unix timestamp.

The returning array contains ten elements with relevant
information needed when formatting a date string:

* [seconds] - seconds
* [minutes] - minutes
* [hours] - hours
* [mday] - day of the month
* [wday] - day of the week
* [year] - year
* [yday] - day of the year
* [weekday] - name of the weekday
* [month] - name of the month

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to find the factorial of a number in php?

531


Which is faster for or foreach php?

505


What is difference between print_r and echo in php?

500


Can a trait extend a class php?

524


Which function would you use to insert a record into a database in php?

564






What is the function file_get_contents() useful for?

484


What is substr() in php? And how it is used?

526


Is php 5 still supported?

524


How to find datatype of variable in php?

532


Is ruby on rails php?

508


What are the advantages of using php?

541


What version of php do I have windows?

487


What is php constructor?

543


How do I install php and apache on windows 10?

518


What are php libraries?

499