simple php table loop


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

Hi all,

I've the following code

Did you know?Explore Trending and Topic pages for more stories like this.
<?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

ALV List Display to point to another report on Double Click
Hi,

I want my ALV List Display to point to another report on Double Click on its line ite

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

Spaghetti Code
So.

I've pretty much reached the point where I have so many isset s on one page that I can't

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

Mail form doesn't send Russian/Cyrillic characters correctly?
When someone enters foreign characters (like Cyrillic text, and Japanese/Chinese probably gives the

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

DateTimeZone::listIdentifiers headache
http://php.net/manual/en/datetimezone.listidentifiers.php


So the documentation states tha

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

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