Please help. We are trying to create a page where thumbnails show on one part of the page where an onclick will produce a larger image on the same page. This code was created by Paul Whitrow from Gr0w. When we try to preview the code, no images show. The images come from an images folder in the site. Obviously we are missing something. Any help or direction would be greatly appreciated. The code is as follows:
[php]
<?php $imagesArray=array(); $imagesArray["src"][0]="images/carli-46-3-picts.jpg"; $imagesArray["alt"][0]="carli"; $imagesArray["src"][1]="images/cicadas.jpg"; $imagesArray["alt"][1]="cicadas"; $imagesArray["src"][2]="images/kids-5x7.jpg"; $imagesArray["alt"][2]="kids"; $imagesArray["src"][3]="images/seasonsofpond.jpg"; $imagesArray["alt"][3]="pond"; print_r($imagesArray["alt"]); $useImage=0; if(isset($_REQUEST)){ while(list($key,$val)=each($_REQUEST)){ if(strstr($key,"_img_x")){ $useImage=str_replace("_img_x","",$key); break; } } } ?> " id="imageSwapperForm" onsubmit="return false"> <? for($i=0; $i < count($imagesArray["src"]); $i++){ echo ''; } ?>" width="250" height="250" border="0" alt="<?=$imagesArray["alt"][$useImage]?>" />
[/php]MOD EDIT: added php tags for readability