write code to find the date difference b/w two given date
using PHP not MYSQL function?

Answer Posted / vipul dalwala

$noofdays = ceil(((strtotime($endDate) - strtotime
($startDate)) / (60*60*24)))

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why php is used in html?

595


What are the Advantages and Application Areas of PHP?

580


Explain do you use composer? If yes, what benefits have you found in it?

618


What are arguments in php?

644


What are the differences between require and include?

640






How many data types are used by php?

587


Do you know what is the function func_num_args() used for?

656


If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?

572


What is the meaning of a final class and a final method?

618


What is the purpose of the '.myi' file extension? What do thes file contain?

591


What are the advantages of triggers in php?

547


Tell me what is the use of "enctype" attribute in a html form?

650


Does php support overloading?

669


What is the difference between nowdoc and heredoc?

622


Which php framework is best for security?

600