Somebody please help out; I'm at my wits end with this one.
I'm getting a parse error message from my server:
Parse error: syntax error, unexpected T_STRING in [pathtofile] on line 137
This is line 137:
Code:
$pic_file = "zz_gallery/gallery_" . $max_pictures . ".php";
These are lines 134 - 160:
Code:
<?php
$pic_file = "zz_gallery/gallery_" . $max_pictures . ".php";
if (file_exists($pic_file)) {
$tmp = file_get_contents($pic_file);
foreach (range(0, $max_pictures-1) as $key) {
$uri = $pic = $picture_set[$key];
if (!$pic) {
$thumb = "<img src='/models/thumb.php5?uri=blank' height='125' width='100' border='0'/>";
} else {
$thumb = "<a href='$pic'><img src='/models/thumb.php5?uri=$pic' height='125' width='100' border='0'/></a>";
}
$tmp = str_replace("[$key]", $thumb, $tmp);
}
echo $tmp;
} else {
echo "<table cellspacing='15' cellpadding='0' border='0'>\n\t<tr>\n";
foreach ($picture_set as $pic) {
echo("\t\t<td><a href='$pic'><img src='/models/thumb.php5?uri=$pic' height='125' width='100' border='0'/></a></td>\n");
}
}
?>
I just can't figure out what the problem is!!!
Bookmarks