-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]]
Sent: 15 July 2002 03:04
This is what I have so far:
for ($m=0; $m$num_rows2; $m++)
{
$row2 = mysql_fetch_array($result2);
echo $row2[devlanguage];
if ($m $num_rows2)
{
echo , ;
}
else
{
echo .;
}
Hi all.
Ive been fooling around with a LOOP which should show one or more text
string stored in separate rows in a DB. The trick would we to separate
them with commas (,) when theres another string to show or end it with
a period (.) if no other row is found according to the SELECT criteria.
try using this if statement instead
if ($m $num_rows2 - 1)
or even use the ?: operator
echo ($m $num_rows2 - 1 ? , : .);
-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 12:04 PM
To: PHP General List
Subject: [PHP] IF inside LOOP?
Hi
-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 14, 2002 11:05 PM
To: 'César Aracena'; PHP General List
Subject: RE: [PHP] IF inside LOOP?
try using this if statement instead
if ($m $num_rows2 - 1)
or even use the ?: operator
echo ($m $num_rows2 - 1
4 matches
Mail list logo