voici mon script
while($plus = mysql_fetch_assoc($data))
{
$image = $plus["idA"];/**** elle existe bien tester avec echo c'est le résultat des recherches****/
echo'<table style="left:0px;">';
$nbCol = 4;
$query = "SELECT * FROM im_annonce WHERE id_gal='".$image."' LIMIT 0,1"; /*********une seule image par annonce******/
$result = mysql_query($query) or die(mysql_error());
$nb = mysql_num_rows($result);
$nbLigne = ceil($nb/$nbCol);
for($l=0;$l<$nbLigne;$l++)
{
echo'<tr>';
for($c=0;$c<$nbCol;$c++)
{
if($ligne=mysql_fetch_array($result)){
$im = $ligne['gal'];
if(isset($im)){
miniature('image_annonce/'.$im.'', 150, 100);
echo'<td><img src="MINI11image_annonce/'.$im.'" border="0"></td>'; // nomCol = nom du champs
}
}
}
echo'</tr>';
}
echo'</table>';
}