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
What is the difference between pop3 IMAP and MAPI?
What is isset and unset in php?
What is the best php version for wordpress?
What is regex in html?
What is uniqid php?
Is null or empty c#?
Explain array_uintersect()?
What do you mean by having php as whitespace insensitive?
Tell me what is the main difference between php 4 and php 5?
What is the interface in php?
Is php secure?
What php framework does wordpress use?
Tell me what is the use of "enctype" attribute in a html form?
Is php a cms?
Explain what is the difference between session and cookie?