Ok, well, I'm making a utility for creating a planner for myself...
I try to run it, but it just hangs... Is there an infinite loop somewhere? What's wrong?
You can see for yourself at:
http://www.nfy.ca/~mike/make_pe_schedule.php
This is my code. Please help me get it working:
<head>
<title>Make a PE Schedule for 7 days</title>
</head>
<body bgcolor="#333333">
<table width="260" border="0" cellpadding="0" cellspacing="0">
<?php
if (!(isset($d))) {
$d = 1;
}
$days = $d * 7;
$activity = array(1 => 'Walk', 'Jog', 'Run', 'Swim', 'None');
for ($i=0;$i<($days+1);$i++) {
echo "<tr>";
echo "<td width=\"30\" align=\"center\"><font color=\"white\"><b>";
if ($i < 10) { echo "0"; };
echo $i;
echo "</b></font></td>";
echo "<td width=\"60\" align=\"center\">";
echo "<font color=\"#CCFFCC\"><b>";
$a = $activity[Rand(1, 5)];
echo $a;
echo "</b></font></td>";
echo "<td width=\"170\"><font color=\"white\">";
$time = (Rand(1, 3) * 30);
if ($a != "None") {
echo " for </font><font color=\"#CCFFCC\"><b>".$time."</b></font><font color=\"white\"> minutes</font>";
}else{
echo "<font color=\"white\">-----------------</font>";
}
echo "</td></tr>";
$timespent[$a] = $timespent[$a] + $time;
}
?>
</table>
<br>
<br>
<h1><font color="white">
Totals:
</font>
</h1>
<table border="1">
<tr>
<td>
<font color="white">
<?php
for($i=1;$i<6;$i++) {
echo $activity[$i] . " :: ". $timespent[($activity[$i])];
echo "<br><br>";
}
?>
</font>
</td>
</tr>
</table>
</body>