View Single Post
Old 7th July 2008, 04:53 PM   #1 (permalink)
wmuckell
Senior Member
 
wmuckell's Avatar
 
Join Date: May 2004
Location: Marden, Kent
Posts: 179
Keeping Object together

I have a php script which get a load of types from a database and draws them to the screen with a checkbox, I want the label of the checkbox and the checkbox itself to stay together, ie. Not seperate over newlines

The code is

Code:
foreach($rows_ads as $row_ad) {
	$typeid = $row_ad->id;
	$name = $row_ad->name;
	$content .="<label for='$name'>$name </label><input type='checkbox' id = '$name' name='adtype[]' value='$typeid' />";
}
Any suggestions on how to keep the LABEL and the INPUT together?
wmuckell is offline   Reply With Quote