Loop column after 2 results


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

Hello All.

Here is what I have:

Did you know?Explore Trending and Topic pages for more stories like this.
Client ID Company name Client ID Company name

I then need a script to echo 2 results per row then start a new row.

I've tried many things, but never could get a second row to appear. Each row will have 4 columns.

Here is my code without the "guts" My vars will be $id and $company.

$result = mysql_query("SELECT * FROM client");
if(mysql_num_rows($result) < 1)
{
$results = 'You have 0 clients.';
}
else
{
$results = '';
$results .= '<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">';
$results .= '<tr>';

while($row = mysql_fetch_array($result))
{

}
$results .= '</table>';
}
No comments posted yet

Your Answer:

Login to answer
232 Like 12 Dislike
Previous forums Next forums
Other forums

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

foreach help.
Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

IIS & NW MII on the same server
Hi,

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

FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde

Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..

I need to pull data for clien

Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill t

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