K, I must be missing something really obvious because I cannot get a stinking for() loop to work right. Can someone please take a look and tell me what I am missing?
<?php
$i = 0;
for($day = 1; $day < 8; $day++ )
{
while( $i < 2400)
{
if( substr( $i, -2 ) > 0 )
{
$i = $i +100;
}
else
{
$i = $i +30;
}
echo("$day | $i<br>");
}
}
?>
That should produce something like
1|30
1|100
1|130
...
2|30
2|100
and on and on, up to 7|2430. However, what I am getting is just the 1|n series. Any help is appreciated.