Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to extract month from given date by using string
functions?

Answer Posted / guest


print strftime('%B',time());

This will return the name of the current month.
And date('M') also will return current month.

If you want to get month from the date then use the
following way.

$date=date('d/M/Y')
$date=substr($date,strpos($date,'/')+1);
$date=substr($date,0,strpos($date,'/'));

Finally $date will contain the month name.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are classes in php?

1002


What is the difference between mysqli_fetch_object() and mysqli_fetch_array()?

979


What is the difference between $message and $$message in php?

922


Explain what is the difference between mysql_fetch_array() and mysql_fetch_assoc()?

846


What is the use of pear in php?

942


What is http php?

901


Do I need to install php after xampp?

951


What are the features and advantages of object-oriented programming in php?

879


What is PECL?

1144


Tell me what does $_env means?

913


What does a special set of tags do in php?

873


Differentiate between require and include?

921


What is csrf token in php?

1030


What are the advantages of indexes in php?

987


How to strip whitespace (or other characters) from the beginning and end of a string?

830