Buongiorno, ho un problema con questo codice : o meglio funziona tutto bene finchè non aggiungo l'ultima parte : else {
foreach ($regioni As $indice => $valore) {
if ($indice == $area) { echo ("Produttori della regione '$valore'
");}
}
Dall'inizio è così :
$regione = $_GET['$regione'];
$area = $regione;
mysql_select_db($database_lacantinettaconn, $lacantinettaconn);
$query_Regioni = "SELECT * FROM regioni";
$Regioni = mysql_query($query_Regioni, $lacantinettaconn) or die(mysql_error());
$totalRows_Regioni = mysql_num_rows($Regioni);
$i = 0;
while ($i < $totalRows_Regioni) {
$estratto = mysql_fetch_assoc($Regioni);
$regioni[$estratto[MG75_CODGRUSTAT2]] = $estratto[MG75_DESGRUSTAT2];
$i = $i + 1 ; } // Ho creato array $regioni
if ($area == "") {echo "SELEZIONARE UNA REGIONE DALLA MAPPA";}
else {
foreach ($regioni As $indice => $valore) {
if ($indice == $area) { echo ("Produttori della regione '$valore'
");}
}
ma quando aggiungo l'istruzione 'else { foreach ... ', mi da questo errore :Parse error: parse error, unexpected $end in c:\inetpub\wwwroot\lacantinetta_eu\TMPacush6pml5.p hp on line 469 che è una linea fuori dal codice html o meglio il tag di chiusura </html> è alla linea 467-
Chi sa aiutarmi ?