I have a product table that i am fetching with:
$query=mysql_query("select * from PRODUCTS left join IMAGES on IMAGES.IDI = PRODUCTS.ID");
while($product = mysql_fetch_array($query))
{
echo "<li><div><img>$product['PICTURENAME']</img></div></li>";
}
The problem is some products have 1 some have more than 1 image.. To list them as slideshow, while fetching should create that pattern;
<li><div class="jquery"><img>$product['PICTURENAME']</img><img>$product['PICTURENAME']</img><img>$product['PICTURENAME']</img></div></li>
<li><div><img>$product['PICTURENAME']</img></div></li>
<li><div class="jquery"><img>$product['PICTURENAME']</img><img>$product['PICTURENAME']</img></div></li>
Which means the products that have only 1 picture should be like;
<li><div><img>$product['PICTURENAME']</img></div></li>
And the other ones should be;
<li><div class="jquery"><img>$product['PICTURENAME']</img><img>$product['PICTURENAME']</img></div></li>
Because of JQUERY Slideshow, two <img>
should be side by side inside <li>
and <div>
The problem is "while" creates <li><div><img></div></li>
each time.. For slideshow it must be like <li><div><img1><img2><img3></div></li>