function get_zodiac() { $db_functions_obj = new DbFunctions(); $zodiacs = $db_functions_obj->get_all_zodiacs(); $helper_obj = new Helper(); $output = "<table id='add_zodiac_table' class='table table-hover table-nomargin table-bordered'>\n <tr>\n <th>" . $helper_obj->t("ID") . "</th>\n <th>" . $helper_obj->t("name") . "</th>\n <th>" . $helper_obj->t("body") . "</th> \n <th>" . $helper_obj->t("Edit") . "</th>\n <th>" . $helper_obj->t("Delete") . "</th>\n </tr>"; foreach ($zodiacs as $key => $zodiac) { $class = $helper_obj->table_row_class($i); $output .= "<tr class='{$class}' id='zodiac_{$zodiac->id}'>\n <td>" . $zodiac->id . "</td>\n <td>" . $zodiac->name . "</td>\n <td>" . $zodiac->body . "</td>\n <td><a href='javascript:void(0);' onclick='openEditZodiacPopup({$zodiac->id})'>" . $helper_obj->t("Edit") . "</a></td>\n <td><a href='javascript:void(0);' onclick='deleteZodiac({$zodiac->id})'>\n " . $helper_obj->t("Delete") . "</div>\n </a>\n </td>\n </tr>"; } $output .= "</table>"; return $output; }