rendered paste body/* * Function for creating radio lists with a custom start and end parameters. */function create_radio_options ($start, $end, $selected, $item, $echo = false){ $return = ''; for ($i = $start; $i <= $end; $i++) $return .= sprintf('<input type="radio" name="%s" value="%d" %s>%d'."\n", $item, $i, selected ($i, $selected), $i); if (!$echo) return $return; echo $return;}###################### The below works perfectly. The above doesnt. Why? ############################/* * Function for creating select lists returning all values for a given parameters. */function create_select_options_array ($array, $selected, $echo = false){ $return = array (); foreach ($array as $key => $val) { $return[] = '<option value="' . $key . '"' . selected ($key, $selected) . '>' . $val . '</option>'; } $return = implode ("\n", $return); if ($echo == true) { echo $return; } else { return $return; }}