note 106076 deleted from function.date by tularis

From: Date: Sun, 09 Oct 2011 09:21:53 +0000
Subject: note 106076 deleted from function.date by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183734@lists.php.net to get a copy of this message
Note Submitter: Anonymous Reason: useless ---- Simple code to get the name of the days since Today to 6 days ago <?php $num_days = Array (date(w), date(w, strtotime("-1 day")), date(w, strtotime("-2 day")), date(w, strtotime("-3 day")), date(w, strtotime("-4 day")), date(w, strtotime("-5 day")), date(w, strtotime("-6 day"))); $weeks_days = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); for ($i = 0; $i < 7; $i++){ for ($j = 0; $j < 7; $j++){ if ($num_days[$i] == $j) $num_days[$i] = $weeks_days[$j]; } } ?>

« previous php.notes (#183734) next »