0) { while ($subrow = mysql_fetch_array($subsql)) { $subsubid = $subrow[0]; $subtitle = $subrow[1]; $subresponse = $subrow[2]; $subtimeresponse = $subrow[3]; $subresusername = $subrow[4]; //if the $id is in the readby field, this should not be bold. $subarray = explode(",",$subresreadby); $subsingleline = ""; echo ''; $subrestofpost = "
".$subresponse."

Posted by ".$subresusername." at ".$subtimeresponse."
Respond
"; $bold = 'bold'; foreach ($subarray as $subkey => $subvalue) { if ($id == $subvalue) $bold = 'normal'; } $subresponse = $subsingleline."".$subtitle."".$tabs.$tabs.$subrestofpost; $sublink = $tabs.$tabs.$subresponse; echo '
'; echo $sublink; echo ""; $bold = 'bold'; recurseme($subsubid,$level); } } } $sql = mysql_query("select educresponse.id,educresponse.initresponse, date_format(educresponse.timepost,'%M %D, %Y %h:%i:%s %p'), educusers.username from educresponse, educusers where educusers.id = educresponse.userid"); while ($row = mysql_fetch_array($sql)) { $rid = $row[0]; $statement = $row[1]; $timeofpost = $row[2]; $username = $row[3]; echo "

".$statement."

"; echo ''; echo "
Respond


"; echo ""; echo "Posted by ".$username." at ".$timeofpost; echo '
'; $innersql = mysql_query("select educresponses.id,educresponses.responsetitle, educresponses.response, date_format(educresponses.timepost,'%M %D, %Y %h:%i:%s %p'), educusers.username from educresponses, educusers where educusers.id = educresponses.userid and educresponses.responseid = '$rid' and educresponses.responsesid = ''"); while ($innerrow = mysql_fetch_array($innersql)) { $response = ''; $singleline = ''; $restofpost = ''; $subid = $innerrow[0]; $title = $innerrow[1]; $response = $innerrow[2]; $timeresponse = $innerrow[3]; $resusername = $innerrow[4]; $array = explode(",",$resreadby); $singleline = ""; echo ''; $restofpost = "
".$response."

Posted by ".$resusername." 'at ".$timeresponse."
Respond
"; $resusername = $innerrow[4]; $bold = 'bold'; foreach ($array as $key => $value) { if ($id == $value) $bold = 'normal'; } $response = $singleline."".$title."".$restofpost; $link = $tabs.$response; echo '
'; echo $link; echo ""; recurseme($subid,1); } echo '


'; //response to responses } ?>