Petit bout de code :
Code : Tout sélectionner
if (file_exists('thumbs/'.$G01.'.jpg'))
$G01_th = "<a href='http://localhost/index3.php?id=$G01'><img src='thumbs/$G01.jpg' title='#01' /></a>";
else
$G01_th = "<a href='http://localhost/index3.php?id=$G01'><img src='$nothumb' title='#01' /></a>";
if (file_exists('thumbs/'.$G02.'.jpg'))
$G02_th = "<a href='http://localhost/index3.php?id=$G02'><img src='thumbs/$G02.jpg' title='#02' /></a>";
else
$G02_th = "<a href='http://localhost/index3.php?id=$G02'><img src='$nothumb' title='#02' /></a>";peut on faire cela de manière plus concise en incrémentant ? (je n'ai pas bien compris le principe de l'incrémentation, et voit mal comment le mettre en place dans la déclaration de variable).
Merci