Hi,
I have the following bit of code that's giving me a parse error in the preg_replace line :
<?php
$search = "JPG";
$replace = "jpg";
$dirPath = opendir("images/test/");
while ($file = readdir($dirPath)) {
if ($file != "." && $file != "..") {
echo "$file";
newfile$ = preg_replace ($search, $replace, $file);
echo "$newfile";
}
}
?>
This should work as near as I can tell! Anybody have any suggestions?
Thanks!