Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How can I convert month name to number? [closed]
  2. $monthName = 'January';
  3. $date = date_parse($monthName);
  4. $monthNumber = $date['month'];
  5.        
  6. class Months
  7. {
  8.     const January  = 1;
  9.     const Feburary = 2;
  10.     // etc.
  11. }
  12.  
  13. var $currentMonth = Months::January;