0

I've been told that using this code to resize images on the fly will help speed it up, however i get this error when parsing.

<?php
$dirname = "pictures/photos/BITA2015/";
$images = scandir($dirname);
$ignore = Array(".", "..");

foreach($images as $curimg)
{
 if (!in_array($curimg, $ignore))
 {
  echo "<a href=".$dirname.$curimg."><img src="resize.php?file=./pictures/photos/BITA2015/$curimg"/></a>";
 }
}   
?>

Parse error: syntax error, unexpected 'resize' (T_STRING), expecting ',' or ';' in D:\Websites\South Holland\photos.php on line 27

I'm not sure what the resize.php has got to have in it too, but it shouldnt error when parsing surely?

Please help, i need this to pass my college assignment

John
  • 1
  • 13
  • 98
  • 177

0 Answers0