Php's big brother and sister, help me solve a problem. I have a variable: $ strDate. the variable value may be or... not always any day of all time, now I want to return the month where this value is changed. that is to say: return the month of the specified date when $ strDate2012-08-06 is returned: 8 when $ strDate2010-02-06 is returned: 2 when $ strD php's big brother-in-law, help me solve a problem.
I have a variable: $ strDate, which may be or... not necessarily any day of all time,
Now I want to return the month in which the value is changed.
That is, the month of the specified date is returned,
If $ strDate = 2012-08-06 is returned: 8
If $ strDate = 2010-02-06 is returned: 2
If $ strDate = is returned: 8
If $ strDate = is returned: 8
What is this function '>?
------ Solution --------------------
Echo date ('N', strtotime ($ strDate ));