something like ?

$cntr = 0;
echo "<tr>";
while ($r = mysql_fetch_array($result0))
  {
            $cntr++;
            $cityid = $r["t_city_id_city"];
            $cityname = $r["t_city_name"];
echo "
    <td class=\"text\"><a
href=\"city_person.php?city_id=$cityid\">$cityname</a></td>
  ";
if ($cntr % 2 == 0)  echo "</tr><tr>";
  } // from while result 0
echo"</tr></table>";


-----Original Message-----
From: John Fishworld [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] table row


apologies for a stupid question ! but it's late !

everthings fine, mysql query, results etc

but I want to produce a table with two columns instead of just one long
column

ie answer1            answer2

can someone please give me a hint how to do it ?

while ($r = mysql_fetch_array($result0))
  {
            $cityid = $r["t_city_id_city"];
            $cityname = $r["t_city_name"];
echo "
    <td class=\"text\"><a
href=\"city_person.php?city_id=$cityid\">$cityname</a></td>
  ";
  } // from while result 0
echo"</table>";

thanks in advance



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to