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

Why use static methods php?

1085


Why php language is used?

985


How to remove an empty directory?

1046


Can you specify the "new line" character in single-quoted strings?

966


Write a program to get lcm of two numbers using php?

969


How to join multiple strings into a single string?

968


Is php a case sensitive language?

1163


Can constructor be private in php?

1040


What is polymorphism?

2508


What is file upload?

1077


What is an abstract class in php?

975


Tell me what does the initials of php stand for?

968


Is php a programming language?

1055


What is the difference between null and empty?

1031


How to get no of arguments passed to a PHP Function?

943