How to get seconds from current date using date function ?
Answers were Sorted based on User's Feedback
Answer / rupa
date("h:i:s");//get current time
date(s);//get only seconds
| Is This Answer Correct ? | 25 Yes | 2 No |
Answer / 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 |
<?php include ("db.php"); $result = mysql_query("SELECT ques_id FROM questionbank order by ques_id limit 5 "); while($obj=mysql_fetch_array($result)) { $ad1[$obj['ques_id']]++;//Used an array and inserted the database query results into it. } $rand_keys=array_rand($ad1,1); //Did a random array function echo "First random id = ".$ad1[$rand_keys[0]]; echo "<br>Second random id = ".$ad1[$rand_keys[1]]; ?> <!--Its not working. Have any solution for this. -->
How big is varchar max?
What good is polymorphism?
What software is required for php?
Do I need to install php after xampp?
What is static in php?
Explain the differences between get and post methods?
Explain php explode() function.
How to get seconds from current date using date function ?
8 Answers Sarna Technologies, Satyam,
how can i disable multiple user in the same password in my website using any scripts
Can we embedded directly PHP code into XHTML document? State Whether True or False?
What is a php class?