PHP: An Array of Months

November 16, 2007 – 2:11 am

I’ll be honest, this isn’t very useful. The goal was to have an array of months in the least amount of code.


for($i = 1; $i <= 12; $i++)
$months[$i] = date('F', strtotime("{$i}/01/2000"));

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit

Post a Comment