Hi guys, i am going to share and very simple but very important function with you. In this post i am gonna show you how to find first date and last date of current month using php. Here are the two functions,
<?php
function firstOfMonth()
{
return date("m/d/Y", strtotime(date('m').'/01/'.date('Y').' 00:00:00'));
}
function lastOfMonth()
{
return date("m/d/Y", strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'))));
}
?>
i want that how can we get last date of month without using "t" or anything,,,,,plzzzzzz tell me
ReplyDeletehow can we get last date of month without using "t" or anything..plzzz tell me
ReplyDelete