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
Tell me what is the difference between get and post?
What is difference between echo and print in php?
What are php strings?
How many types of functions are there in php?
What is the use of php and mysql?
Is false empty php?
Why is facebook still using php?
What is a controller in programming?
What is query string php?
What is x+ mode in fopen() used for?
How can we know the total number of elements of Array?
Is php used for frontend or backend?
What are the disadvantages of php?
What can php do?
Explain the difference between isset() and empty()?