How to get seconds from current date using date function ?

Answer Posted / ghan shyam

by using date function like :
date("s",time());

or
date("s",strtotime("$dt")); for given date in $dt

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I convert ereg expressions to preg in php?

472


What is in a cookie?

545


How to assigning a new character in a string?

569


What are the two most common ways to start and finish a php block of code?

621


How can php and javascript interact?

739






What is the purpose of pear in php?

578


How to upload file in php?

534


What is the method to register a variable into a session?

480


Does php have multiple inheritance?

498


What is difference between md5 and SHA256?

532


What is the differences between $a != $B and $a !== $B?

526


How to remove html tags from data in php?

617


What is return in php function?

484


How do I expire a php session after 30 minutes?

529


Which function is used to read a single character from a file in PHP.

557