Bonjour , je viens vous demander de l aide car je patauge dans mon ecriture sur un code que je retravaille , mais suis pas expert du tout...
Le probleme est que je veux afficher l'un OU l'autre et là s'affiche l'un ET l'autre ( donc soit une image si la video n'est pas là ; les images sont toujours dispo, mais pas la video qui est proposée de temps en temps)...qui peut me dire où je plante SVP? merci beaucoup
Code:
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
31 <? if(trim($r["youtube_link"])!='') { ?> <div style="float:left;margin-top:5px;"> <object width="490" height="325"><param name="movie" value="<?=$r["youtube_link"];?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="transparent" /></param><embed src="<?=$r["youtube_link"];?>" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" width="490" height="325"></embed></object> </div> <? } else ?> <? $tab_photos=array(); for($i=1;$i<=1;$i++) { $path_img2 = 'photos/'.$r["id"].'_'.$i.'.jpg'; if(file_exists($path_img2)) { $tab_photos[]=array($i,$id_resto,$path_img2); } }?> <? $cpt=1; foreach($tab_photos as $val) { ?><div style="float:left;margin-top:5px;width:490px; height:325px;"><img src="<?=$val[2];?>" width="490" height="325"/></div> <? } ?>