how to extract month from given date by using string
Answer Posted / subodh
Assume date is like $datestr = '01-12-2013';
then it can be below two ways:
1. echo date('M', strtotime($datestr)); // for textual
// Or date('m', strtotime($datestr)); // for numeric
2. $list($d, $m, $y) = explode('-', $datestr);
echo $m; // for numeric
|Is This Answer Correct ?||0 Yes||0 No|
Why php is used in html?
How to access a Static Member of a Class in PHP?
Write the statements that are used to connect php with mysql
Is php difficult to learn?
/temp is a type of filesystem directory. State Whether True or False?
What is the function of trim?
What is xss in php?
Tell me what is the actually used php version?
What are php magic quotes?
How to reset/destroy a cookie in php?
Explain what is memcache?
What are the ways to define a constant in php?
What is the use of htmlentities in php?
When sessions ends?
What is difference between required and require_once in php?