RE: [PHP-WIN] this is so difficult for me

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You need two loops for that, just like the code
that somebody posted for you.  Reuse that code,
and it will probabley work out oki fine with you.

-----Original Message-----
From: Thomas Edward Lawrence
To: php-windows@lists.php.net
Sent: 2003-08-24 11:56
Subject: [PHP-WIN] this is so difficult for me 

I have an array $row["pictures"] which includes 15 pictures ,  I want to
echo it like this , this is so difficult for me ,

picture1    picture2    picture3    picture4    picture5

picture6    picture7    picture8    picture9    picture10

picture11    picture12    picture13    picture14    picture15


this is my code ;

<?
mysql_connect('localhost', '', '');
mysql_select_db("myshop");
$result= mysql_query("select * from productlist where id=$mn") ;
$i = 0;
$cnt = mysql_num_rows($result);
while ($i <= $cnt)
{
     $row = mysql_fetch_array($result) ;
     $i++ ;
     $_SESSION["picture($i)"] = $row["pictures"]  ;
      echo "<tr><td><img src=". $row["pictures"] ."></td></tr>" ;
 }
?>

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux