"; echo "$year\n"; echo "$week\n"; for ($i = 1; $i <= 7; $i++){ echo " $new_visits[$i] / $total_visits[$i]\n"; } echo "\n"; } ?>
New and Total Users by Day/Week
Legend: First Time Users / Total Users
$week && j<>1) { // reset if week has changed print_table_daysofweek($year, $week, $total_visits, $new_visits); $year = $row_Recordset1['year']; $week = $row_Recordset1['week']; $total_visits = array(1 => 0,2 => 0,3 => 0,4 => 0,5 => 0,6 => 0,7 => 0); $new_visits = array(1 => 0,2 => 0,3 => 0,4 => 0,5 => 0,6 => 0,7 => 0); } //if $dayofweek = intval($row_Recordset1['dayofweek']); $total_visits[$dayofweek] = $row_Recordset1['total_visits']; $new_visits[$dayofweek] = $row_Recordset1['new_visits']; } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); // while ?>
Year Week Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Legend:
First Time Users Total Users