Guten Tag zusammen
Hab mich erstmals mit PHP auseinander gesetzt und versuche habe diverses ausprobiert. ich habe die MICRO Photo Gallery im betrieb und versuche nun die Bilder alphabetisch zu sortieren, habe eine array eingebaut jedoch erhalte ich folgende fehlermeldung
PHP-Code:
Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in ..../httpdocs/index.php on line 90
Die Linien 80-10 sehen so aus, die Zeilte mit array.... ist jene auf Zeile 90
PHP-Code:
function getNormalImage($file){
$base = substr($file,0,strrpos($file,'_th.jpg'));
if (file_exists($base.'.jpg')) return $base.'.jpg';
elseif (file_exists($base.'.jpeg')) return $base.'.jpeg';
else return "";
}
function displayPhotos(){
global $columns;
array $array [, int $sort_image = SORT_REGULAR ];
generateThumbnails();
$act = 0;
// Open the actual directory
if ($handle = opendir(".")) {
// Read all file from the actual directory
while ($file = readdir($handle)) {
// Check whether tha actual item is a valid file
if (is_file($file)){
// Check whether the actual image is a thumbnail
if (strpos($file,'_th.jpg')){
++$act;
if ($act > $columns) {
echo '</tr><tr><td class="photo"><a href="'.getNormalImage($file).'"><img src="'.$file.'" alt="'.$file.'"/></a></td>';
$act = 1;
} else {
echo '<td class="photo"><a href="'.getNormalImage($file).'"><img src="'.$file.'" alt="'.$file.'"/></a></td>';
}
}
}
}
}
}
?>
Welche zeile geht nicht auf?
Besten Dank
Philipp