‘; print “

“; parsing($row[‘subject_group_name’]); print “

“; print “
“; print ‘
‘ . “\n”; $subquery = “select s.subject_id, s.subject_name from subjects as s, subject_group_map as sgm where s.subject_id = sgm.subject_id and sgm.subject_group_id = ” . $row[‘subject_group_id’]; $subresult = mysql_query($subquery); while ($subrow = mysql_fetch_assoc($subresult)) { print ‘– ‘; parsing ($subrow[‘subject_name’]); print “
“; } print “
\n”; } ?>
0) { if ($numberofmatches == 1) { print “

“; parsing($subject); print ” tutor (“; parsing($group); print ‘)


We found 1 tutor who specializes in that subject. ‘; } else { print “

“; parsing($subject); print ” tutors (“; parsing($group); print “)


We found $numberofmatches tutors who specialize in that subject.
“; } print “Click on a tutor below to see the full profile.\n”; print “

\n\n”; while ($row = mysql_fetch_assoc($result)) { print ‘\n\n\n\n”; } print “
‘; $nicename = str_replace(” “, “-“, $row[‘tutor_name’]); print ‘‘ . ‘‘ . ‘‘ .$row[‘tutor_name’] . “

“; $firstname = explode(‘ ‘,$row[‘tutor_name’]); $input = $row[‘tutor_description’]; $pos = strpos($input, ‘.’ , 1); $pos = strpos($input, ‘.’ , $pos+1); $output = substr($input, 0, $pos+1); $nicesubject = str_replace(“-“, ” “, $subject); print “$output $firstname[0]”; print ” teaches $nicesubject and the following subjects:

“; $subquery = “select sg.subject_group_id, sg.subject_group_name, s.subject_name from subjects as s, subject_groups as sg, subject_group_map as sgm, tutor_subject_map as tsm where sg.subject_group_id = sgm.subject_group_id and sgm.subject_id = s.subject_id and tsm.subject_id = s.subject_id and tsm.tutor_id = ” . $row[‘tutor_id’] . ” order by sg.subject_group_name asc, s.subject_name asc”; $subresult = mysql_query($subquery); $register = 0; $subjects_output = “”; while ($subrow = mysql_fetch_assoc($subresult)) { if ($subrow[‘subject_group_id’] != $register) { if ($register != 0) { $subjects_output = substr($subjects_output, 0, -2); $subjects_output .= “
\n”; } $subjects_output .= “” . $subrow[‘subject_group_name’] . “: “; $register = $subrow[‘subject_group_id’]; } $subjects_output .= $subrow[‘subject_name’] . “, “; } $subjects_output = substr($subjects_output, 0, -2); $subjects_output .= “
\n”; parsing($subjects_output); print “

\n”; } else { ?>

No tutors were found who specialize in that particular subject. Please try another!

Subjects we tutor


Select a subject at left to see a list of tutors who specialize in that subject