Totally ignorant need for clarification... Should I set up a counter for loops $integer++ or if I'm going through something, the while function knows to just go through those and fills in array numbers accordingly?

Below is my project (while loop at the bottom):

I'm getting unexpected $end on line 18 but the file only has 17 lines!

<?php
  if (isset ($_REQUEST ['IMGDIR'])){
  $imagedir=$_REQUEST ['IMG_DIR'];
   } else {
  $imagedir = PUB_DIR . '/grasses';
   #PUB_DIR coordinates my public htm location at home & school
   }
  if (!(chdir ($imagedir))){
    print "invalid directory";
    }
  $fh=opendir($imagedir);
  while ($file = readdir($dh)){
      if (strstr ($file, '.jpg')){
      $pictures[] = $file;
      }
  #vardump ($pictures[]);
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to