'; //gencontent echo '
'; // table header $slotid=0; foreach($slots as $slot) { echo ""; //fill slot coverage table with zeroes $slotCoverage[$slotid] = 0; $slotid++; } // content $personid = 0; $persons_cnt = count($people) +1; // first loop to calculate slot coverage foreach($people as $person) { $slotid = 0; foreach($slots as $slot) { if (isChecked($person, $slotid)) { $slotCoverage[$slotid]++; $covered[$person]++; } $slotid++; } } ksort($slotCoverage); // main printing loop foreach($people as $person) { $personid++; echo ''; $slotid = 0; $slotscovered = $covered[$person] ? $covered[$person] : 0; foreach($slots as $slot) { echo '\n"; $slotid++; } } echo ''; echo '
Person{$slot}
' . $person . '
'; echo ''; echo '
'; $coverage = implode(",", $slotCoverage); $dl = implode('|', $slots); $clr = implode('|', $colors); echo ''; // http://www.colourlovers.com/palette/523540/nautical_passion echo '
'; ?>