note 6162 rejected from ref.math by hholzgra
| From: | hholzgra@php.net | Date: | Sat, 02 Mar 2002 18:02:09 +0000 |
| Subject: | note 6162 rejected from ref.math by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-27267@lists.php.net to get a copy of this message | ||
WHat are Yall doing?! Here is a simple example to show how many weeks and days there are in any
given number of days.
echo "In ".$daze." days ";
$weaks = ( ($daze - ($daze % 7)) / 7 );
$daze = ($daze % 7);
echo "there are ".$weaks." weeks";
echo " and ".$daze." days!";
EXAMPLE FOR: $daze=46
In 46 days there are 6 weeks and 4 days!