id); $name = $is_favorited ? "unset" : "set"; $label = $is_favorited ? "Un-Favorite" : "Favorite"; $html = " ".make_form(make_link("change_favorite"))." "; return $html; } public function display_people($username_array) { global $page; $i_favorites = count($username_array); $html = "$i_favorites people:"; reset($username_array); // rewind to first element in array. foreach($username_array as $row) { $username = html_escape($row); $html .= "
$username"; } $page->add_block(new Block("Favorited By", $html, "left", 25)); } }