So I've made some progress in my project, but there's a problem I don't know how to solve :
I've attached a picture showing the result (). What I'd like to have is a table where each product has its column. I think I should use foreach, but I didn't find examples corresponding to what I want. Here's my code :
Code: Select all
<table id='tabletest' width='100%' class='sample'>
<?php
while($row = mysql_fetch_array($result))
{
?>
<tr>
<td align='center'><img src='/abcm/image.php/<?php echo $row['fichier'] ?>?width=150&height=150&cropratio=1:1&image=/abcm/images/<?php echo $row['fichier'] ?>' alt='Dont forget your alt text' />test1</td>
<td align='center'><img src='/abcm/image.php/<?php echo $row['fichier'] ?>?width=150&height=150&cropratio=1:1&image=/abcm/images/<?php echo $row['fichier'] ?>' alt='Dont forget your alt text' />test2</td>
<td align='center'><img src='/abcm/image.php/<?php echo $row['fichier'] ?>?width=150&height=150&cropratio=1:1&image=/abcm/images/<?php echo $row['fichier'] ?>' alt='Dont forget your alt text' />test3</td>
</tr>
<?php
}
?>
</table>Code: Select all
<table id='tabletest' width='100%' class='sample'>
<?php
while($row = mysql_fetch_array($result))
{
?>
<tr>
<td align='center'><img src='/abcm/image.php/<?php echo $row['fichier - 1st line'] ?>?width=150&height=150&cropratio=1:1&image=/abcm/images/<?php echo $row['fichier'] ?>' alt='Dont forget your alt text' />test1</td>
<td align='center'><img src='/abcm/image.php/<?php echo $row['fichier - 2nd line'] ?>?width=150&height=150&cropratio=1:1&image=/abcm/images/<?php echo $row['fichier'] ?>' alt='Dont forget your alt text' />test2</td>
<td align='center'><img src='/abcm/image.php/<?php echo $row['fichier - 3rd line'] ?>?width=150&height=150&cropratio=1:1&image=/abcm/images/<?php echo $row['fichier'] ?>' alt='Dont forget your alt text' />test3</td>
</tr>
<?php
}
?>
</table>