$entry[name], "; } return $contentvar; } function extAuthors($extAuthorsString) { if($extAuthorsString == null) return; $extAuthorsString = trim($extAuthorsString); if($extAuthorsString == null || $extAuthorsString == "") return null; $answer = array(); for($i = 0; ; $i++) { $first_pos = strpos($extAuthorsString, ":!:"); if($first_pos === false) { $answer[$i] = trim($extAuthorsString); break; } else { $answer[$i] = trim(substr($extAuthorsString, 0, $first_pos)); $extAuthorsString = trim(substr($extAuthorsString, $first_pos + 3)); } } for($j = 0; $j < count($answer); $j++) { if($j == (count($answer) - 1)) $contentvar .= "$answer[$j]. "; else $contentvar .= "$answer[$j], "; } return $contentvar; } $query = "SELECT * from people WHERE groups LIKE '%!$groupID!%' ORDER BY lname"; $result = mysql_query($query); if(mysql_num_rows($result) > 0) { $content .= ""; for ($i = 0; $i < mysql_num_rows($result); $i++) { if($i % 2 == 0) { $bgcolor="#D3D3D3"; } else { $bgcolor="#B5B5B5"; } mysql_data_seek($result, $i); $entry = mysql_fetch_array($result); $content .= "\n"; } $content .= "
"; $content .= "$entry[lname], $entry[fname]"; $content .= " - $entry[title]
$entry[phone] $entry[officeLoc]
"; } return $content; ?>