simple php table loop


Posted on 16th Feb 2014 07:03 pm by admin

Hi all,

I've the following code

<?php // Create category options
$query = "SELECT * FROM categories ORDER BY category ASC";
$result = mysql_query ($query);
while ($row = mysql_fetch_array ($result, MYSQL_NUM)) {
echo "<input type="checkbox" name="types[]" value="$row[1]">$row[1]n";
}
?>

This lists out up to 15 checkboxes, but can increase or decrease if more are added/removed. At present this simply produces a list.
How can I alter the above to produce a nice table with say 5 checkboxes per row?

No comments posted yet

Your Answer:

Login to answer
207 Like 5 Dislike
Previous forums Next forums
Other forums

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

php code generators
All

Whilst enjoying learning a new language i have come accross a number of free code generat

How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info

list files from folder, only one for each date
I have many files in a folder and wish to only list one of each date

these are the file names

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,

Whats the relationship between the following components: Aris, Netweaver BP

IIS & NW MII on the same server
Hi,

We're weighing the possibility to run both IIS and MII (NetWeaver) on the same server

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash