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 is the function mysql_pconnect() useful for?

940


I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?

934


What is php session start?

1012


How can you declare the array in php?

972


Can you explain, when to use if-else if-else over switch statements?

1002


Explain me what is x+ mode in fopen() used for?

1008


What is the static variable in function useful for?

953


Is polymorphism inherited?

991


What are php functions?

1032


Explain array_uintersect()?

998


Write down the benefits of php7?

1046


Explain converting an object?

1013


Why should I store logs in a database rather than a file?

1019


What is php explain how php works?

968


How to get the total number of values in an array?

999