Codice PHP:
	
<html><head><title>Immagini</title> 
<style> 
table { 
    width: 80%; 
    background-image: url(pixel_scuro.png); 
    background-repeat: repeat; 
} 
img { 
    max-width: 35%; 
} 
</style> 
</head><body><table height="100%" width="100%" border="0"><tr><td height="100%"><center> 
<table><tr> 
<? 
for($z=1; $z==1;) { 
$a=1; 
$error=0; 
$z=1; 
$colonna=1; 
if (file_exists('/immagini/immagine_'.'$a'.'.jpg') {$dest='/immagini/immagine_'.'$a'.'.jpg';} else {$error+=1;}
if (file_exists('/immagini/immagine_'.'$a'.'.jpeg') {$dest='/immagini/immagine_'.'$a'.'.jpeg';} else {$error+=1;}
if (file_exists('/immagini/immagine_'.'$a'.'.gif') {$dest='/immagini/immagine_'.'$a'.'.gif';} else {$error+=1;}
if (file_exists('/immagini/immagine_'.'$a'.'.png')) {$dest='/immagini/immagine_'.'$a'.'.png';} else {$error+=1;}
if($error==4) 
    { 
    $z+=1; 
    if($colonna==1) 
         {echo "Non esiste nessuna immagine! Caricane una cliccando [url="index.html"]qua[/url]</td></tr>";}
         else 
         {echo "</tr>";} 
    } 
    else 
    { 
    if($colonna % 2==0) {echo "</tr><tr>";} 
    echo '<td><img href="$dest"></td>'; 
    } 
} 
echo "</table>"; 
?> 
</center></table></body></html>
 
ho corretto ma continua a darmi errore... credo che esso sia qua...
	Codice PHP:
	
if (file_exists('/immagini/immagine_'.'$a'.'.jpg') {$dest='/immagini/immagine_'.'$a'.'.jpg';} else {$error+=1;}
if (file_exists('/immagini/immagine_'.'$a'.'.jpeg') {$dest='/immagini/immagine_'.'$a'.'.jpeg';} else {$error+=1;}
if (file_exists('/immagini/immagine_'.'$a'.'.gif') {$dest='/immagini/immagine_'.'$a'.'.gif';} else {$error+=1;}
if (file_exists('/immagini/immagine_'.'$a'.'.png')) {$dest='/immagini/immagine_'.'$a'.'.png';} else {$error+=1;} 
 
perché quando apro la pagina mi da
Parse error: syntax error, unexpected '{' in /membri/phprove/immagini_uploadate.php on line 28
la linea 28 è la prima nel codice sopra e quelle sotto hanno la stessa struttura...
*se esiste il file assegna a dest il suo indirizzo
ho messo '/immagini/immagine_'.'$a'.'.jpeg' tra ' e separate da un punto per unirle... credo sia qua l'errore