From e2ee104434f03e09d337488a6e98cf37d70028dc Mon Sep 17 00:00:00 2001 From: james Date: Thu, 29 Mar 2007 19:36:04 +0000 Subject: [PATCH] If all the schools are the same, then only show the school name once, instead of once for each student. --- confirmed_participants.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/confirmed_participants.php b/confirmed_participants.php index b78c3b8c..e74c13a7 100644 --- a/confirmed_participants.php +++ b/confirmed_participants.php @@ -133,12 +133,21 @@ $studnum=1; $schools=""; $students=""; + $sameschools=true; + $lastschool=""; while($studentinfo=mysql_fetch_object($sq)) { $students.="$studentinfo->firstname $studentinfo->lastname
"; $schools.="$studentinfo->school
"; + if($lastschool) + { + if($lastschool!=$studentinfo->school) + $sameschools=false; + } + $lastschool=$studentinfo->school; $stats_totalstudents++; } + if($sameschools) $schools=$lastschool; echo "$schools"; echo "$students"; echo "";