php - how to arrange the checkboxes in 3/3 format on a layout of a form -


Is there anyone can tell me how to organize a list of the consonants labeled check box, which is derived from the data base And when it is being displayed, then it is not in the sequence in sequence, I want to display it in 3 to 3 format. Here's the code for it:

  & lt; Div id = "frmform" & gt; & Lt; Form name = "frmrestaurant" id = "frmrestaurant" method = "post" onsubmit = "enctype =" multipart / form-data "& gt; & lt; p class =" msgsignup "& gt; add restaurant & lt; / p & Lt; div id = "addr"> 
gt; label = "restaurant_name" Class = "name" & gt; Restaurant name: & lt; / label & gt; & lt; input type = "text" name = "restaurant_name" size = "32" id = "restaurant_name" value = "& lt; ; Php echo $ row-> Restaurant_name ;; & Gt; "Class =" valid [required, custom [only layer], length [0,100]] text input "/> & lt; / div & gt; & lt; / div & gt; & lt; div & gt; & lt ; Label = "website" class = "name" & gt; website: & lt; / label & gt; & lt; input size = "32" type = "text" name = "website" id = "website" value = "& Lt; ? Php echo $ row-> Website;; & Gt; "Class =" valid [required, length [0,100]] text input "/>
gt; label =" budget "class =" name "& gt; ; Budget: & lt; / label & gt; & lt ;? php ['budget'];; & gt; & lt; / div & gt; & lt; div & gt; label; label = "idcuisine" class = "Food" & gt; Food: & lt; / label & gt; & lt ;? php ['food'] ;? gt; & gt; div & gt; label = "idcategory" class = " Category "& gt; Category:
Php [echo $ this-> lists ['category'];? & Gt; >

"itemprop =" text ">

This PHP can be done with the right logic

  & lt; Tr & gt; & Lt ;? Php while ($ ofetch = $ db-> fetchNextObject ($ query)) {$ j ++; ? & Gt; & Lt; Td width = "33%" & gt; & Lt; Input type = "checkbox" name = "service []" id = "service" value = "& lt ;? php echo $ ofetch-> service_id? & Gt;" / & Gt; Some text & lt; / Td> & Lt ;? Php if ($ j% 3 == 0) {resonant "  tr & gt;";}}? & Gt; & Lt; / TR & gt;  

Comments