Use a counter when iterating through the results
When counter % (modulus) 3=0 then write a new row
Mark
-Original Message-
From: Simon Allison [mailto:[EMAIL PROTECTED]
Sent: 22 April 2005 15:00
To: php-general@lists.php.net
Subject: [PHP] Repeat Accross, then down
Say for a photo
Hi, what you want to do is only echo the tr and /tr every 7 loops
through the records.
Untested example:
table
?
$i = 0;
$sql = SELECT id FROM table name;
$result = mysql_query($sql);
while($myrow = mysql_fetch_array($result))
{
$i++;
if($i == 1) { echo tr; }
echo
-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]]
Sent: 11 December 2002 02:50
I want to repeat the following code as many times as the user
specifies in the variable $_POST['x']. I then need to have
the output display as all the numbers found in the sequence.
How
Hello Scott,
I took a look at your code, and have a solution for you.
Here's the code:
while ($row = mysql_fetch_array($result) )
{
if ($row[memberid] == $login_id)
{
// your code here :-)
}
}
$row = mysql_fetch_array($result); // Get one row
Thanks for your reply.
Unfortunately, the problem is not in getting the code to execute - I know it
is for two reasons:
1) the setcookie(...) is being triggered because I have cookie warnings
turned on in the browser, and it warns me that a new cookie is being
received and it shows me the
5 matches
Mail list logo