/** * AJAX utility function for adding a new choice. */ public function add_choice() { echo ot_choices_view($_REQUEST['name'], $_REQUEST['count']); die; }
function ot_loop_through_choices($name, $choices = array()) { $content = ''; foreach ((array) $choices as $key => $choice) { $content .= '<li class="ui-state-default list-choice">' . ot_choices_view($name, $key, $choice) . '</li>'; } return $content; }