Change selectbox to as radio

This function is to display selected value from database in "sele

Page 1 of 1

1 Replies - 1877 Views - Last Post: 23 June 2007 - 01:21 AM Rate Topic: -----

#1 angela5  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 13-June 07

Change selectbox to as radio

Posted 23 June 2007 - 12:52 AM

This function is to display selected value from database in "selectbox".

function vector2options($show_vector,$selected_map_val="",$exclusion_vector=array(),$tabs="") { 
	$myreturn=''; 
	while (list($k,$v)=each($show_vector)) { 
		if (!in_array($k,$exclusion_vector)) { 
			$myreturn.="$tabs<option value=\"".$k."\""; 
			if ((!is_array($selected_map_val) && $k==$selected_map_val) || (is_array($selected_map_val) && in_array($k,$selected_map_val))) { 
				$myreturn.=" selected=\"selected\""; 
			} 
			$myreturn.=">".$v."</option>\n"; 
		} 
	} 
	return $myreturn; 
}  


Please help to change this function for "radio button" and "multiple selectbox".
Thank you very much in advance.

This post has been edited by angela5: 23 June 2007 - 12:54 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Change selectbox to as radio

#2 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 93
  • View blog
  • Posts: 3,583
  • Joined: 31-March 03

Re: Change selectbox to as radio

Posted 23 June 2007 - 01:21 AM

We don't do your work for you. Radio buttons and Multiple select boxes are simple enough.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1