Tuesday, November 9, 2010

PHP Create an Array of the Last 30 Days

SkyHi @ Tuesday, November 09, 2010
<?php
$d = array();
for($i = 0; $i < 30; $i++) 
    $d[] = date("d", strtotime('-'. $i .' days'));
?> 


REFERENCES
http://stackoverflow.com/questions/337760/create-an-array-of-the-last-30-days-using-php