Count Total Days From Current day to Your Bithday day
<html>
<body>
<center>
<h4>Count Number of days From Current Date to your Bithday date</h4>
<?php
function Count_days()
{
$curr_date=date("d-m-Y");/*you can change date format like date("m/d/Y")*/
echo 'Current Date : '." ".$curr_date;
$days = (strtotime(date("30-7-2012"))-strtotime(date("$curr_date")))/ (60 * 60 * 24);
/*in first date you have to povide your Birth date and in second it is current date */
?>
<br>
<?php
print $days." "." Days Remaining for your Birthday";
}
?>
<?php
Count_days();
/*It calls the function Count_days()*/
?>
</center>
</body>
</html>
<html>
<body>
<center>
<h4>Count Number of days From Current Date to your Bithday date</h4>
<?php
function Count_days()
{
$curr_date=date("d-m-Y");/*you can change date format like date("m/d/Y")*/
echo 'Current Date : '." ".$curr_date;
$days = (strtotime(date("30-7-2012"))-strtotime(date("$curr_date")))/ (60 * 60 * 24);
/*in first date you have to povide your Birth date and in second it is current date */
?>
<br>
<?php
print $days." "." Days Remaining for your Birthday";
}
?>
<?php
Count_days();
/*It calls the function Count_days()*/
?>
</center>
</body>
</html>
No comments:
Post a Comment