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

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

Remove values in array2 from array1
I have two arrays.

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

Encrypt php code?
Is it possible to encrypt php code in files,
so that it displays a load of unreadable characters

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Login Control?!
I have a Web Site that uses the login control also I have set the destinationurl to the page I want

mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Spaghetti Code
So.

I've pretty much reached the point where I have so many isset s on one page that I can'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