Jump to content

Display Product Help


daphneeu

Recommended Posts

Hi , I need help in displaying images probably 4 per row and under the image each display their brand.

 

This is what i have so far, the brand shows beside the images.

 <?php
  $displayPhoto = "";
  $displayAuctionId = "";
      $a = 0;
  while($row = mysql_fetch_array($result)){
		$a++;
		$displayPhoto .= "<tr><img src='image/".$row['image']."' height=200px width=200px /></tr>"."<tr>".$row['brand']."</tr>";

		if (($a%4) == 0){
		$displayPhoto .="<br/><br/>";

		}
		 }
		 echo $displayPhoto;
             ?>

 

and i tried this , which does not have a row of 4 images.

 

      <div id="content">

      <?php
  $displayPhoto = "";
  $displayBrand = "";
      $a = 0;
  while($row = mysql_fetch_array($result)){


              ?><p> </p>
           	 <table width="168" border="0" align="center">

                         <tr>
                              <td><img src="image/<?php echo $row['image']; ?>" width="133" height="180" /></td>          </tr>
                          </tr>
                          <tr>

                               </tr>
                          <tr>
                              <td><div align="center"><span class="style6">Brand: <?php echo $row['brand']; ?></span></div></td>
                          </tr>
                          </table>          <p> </p></td>
                            </tr><tr bgcolor="#6699FF"><td height="20" valign="top" bgcolor="#FFFFFF"> </td>
                            </tr>
                           <p>
<?php	} ?>
                        </div> 

 

I just cant get to what i wanted. Help will be greatly appreciated thank you

Link to comment
https://forums.phpfreaks.com/topic/241686-display-product-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.