Bonjour à tous
Je ne sais pas si ce topic est à sa bonne place. Il se trouve que je développe en PHP mais il s'agit surtout d'un problème d'algo sur lequel je bloque (peut être l'heure avancée).
Voici mon problème :
Voila mon code (oui, c'est de l'HTML)
Je voudrais écrire la même chose, en PHP, a l'aide d'une simple boucle en itérant sur le nom du fichier.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <tr height="160px"> <td width="180px"><center><img id="fond_animaux_001" src="images/fond/mini/animaux/01.gif" onclick="selectBackgroundImage('fond_animaux_001');"/></center></td> <td width="180px"><center><img id="fond_animaux_002" src="images/fond/mini/animaux/02.gif" onclick="selectBackgroundImage('fond_animaux_002');"/></center></td> <td width="180px"><center><img id="fond_animaux_003" src="images/fond/mini/animaux/03.gif" onclick="selectBackgroundImage('fond_animaux_003');"/></center></td> </tr> <tr height="160px"> <td width="180px"><center><img id="fond_animaux_004" src="images/fond/mini/animaux/04.gif" onclick="selectBackgroundImage('fond_animaux_004');"/></center></td> <td width="180px"><center><img id="fond_animaux_005" src="images/fond/mini/animaux/05.gif" onclick="selectBackgroundImage('fond_animaux_005');"/></center></td> <td width="180px"><center><img id="fond_animaux_006" src="images/fond/mini/animaux/06.gif" onclick="selectBackgroundImage('fond_animaux_006');"/></center></td> </tr> <tr height="160px"> <td width="180px"><center><img id="fond_animaux_007" src="images/fond/mini/animaux/07.gif" onclick="selectBackgroundImage('fond_animaux_007');"/></center></td> <td width="180px"><center><img id="fond_animaux_008" src="images/fond/mini/animaux/08.gif" onclick="selectBackgroundImage('fond_animaux_008');"/></center></td> <td width="180px"><center><img id="fond_animaux_009" src="images/fond/mini/animaux/09.gif" onclick="selectBackgroundImage('fond_animaux_009');"/></center></td> </tr> <tr height="160px"> <td width="180px"><center><img id="fond_animaux_010" src="images/fond/mini/animaux/10.gif" onclick="selectBackgroundImage('fond_animaux_010');"/></center></td> <td width="180px"><center><img id="fond_animaux_011" src="images/fond/mini/animaux/11.gif" onclick="selectBackgroundImage('fond_animaux_011');"/></center></td> <td width="180px"><center><img id="fond_animaux_012" src="images/fond/mini/animaux/12.gif" onclick="selectBackgroundImage('fond_animaux_012');"/></center></td> </tr> <tr height="160px"> <td width="180px"><center><img id="fond_animaux_013" src="images/fond/mini/animaux/13.gif" onclick="selectBackgroundImage('fond_animaux_013');"/></center></td> <td width="180px"><center><img id="fond_animaux_014" src="images/fond/mini/animaux/14.gif" onclick="selectBackgroundImage('fond_animaux_014');"/></center></td> <td width="180px"><center><img id="fond_animaux_015" src="images/fond/mini/animaux/15.gif" onclick="selectBackgroundImage('fond_animaux_015');"/></center></td> </tr> <tr height="160px"> <td width="180px"><center><img id="fond_animaux_016" src="images/fond/mini/animaux/16.gif" onclick="selectBackgroundImage('fond_animaux_016');"/></center></td> <td width="180px"><center><img id="fond_animaux_017" src="images/fond/mini/animaux/17.gif" onclick="selectBackgroundImage('fond_animaux_017');"/></center></td> <td width="180px"><center><img id="fond_animaux_018" src="images/fond/mini/animaux/18.gif" onclick="selectBackgroundImage('fond_animaux_018');"/></center></td> </tr>
Merci à qui pourra me donner une piste. Je suis complètement bloqué là.
Partager