ok this is my code
<html><body>
<?
$path = 'images/';
$counter=0;
$counterStart = 0 ;
$counterEnd = $counterStart + 16 ;
$img='';
$imgTotal=0;
$dir_handle = @opendir($path) or die("Unable to open $path");
while($file = readdir($dir_handle)) {
if (substr($file, -3) == 'gif') {
$imgTotal++;
$counter++ ;
if ($counter > $counterStart && $counter <= $counterEnd) {
$ImgArray=Array($counter=>$file,);
} }}
closedir($dir_handle);
?>
<?php
echo "($ImgArray[1])";
?>
</body></html>
how can i access my array outside the loop???
thx