Parse error: syntax error, unexpected '$Database' (T_VARIABLE) in /web/htdocs/www.aieci.it/home/Ptp145a000/salva.php on line 23 : <p>I've got this error on the following code and I'm not able to solve.
I've already cheched with hex editor and everything seems to be ok.
Can someone help me?</p>

<p>The database in defined in another php file recalled with the include statement at the beginning.</p>

<p>The code is the following:</p>

<pre><code>&lt;?php
// -----------------------------------------------------------
// INCLUSIONE FILE
// ----------------------------------------------------------------------
$GLOBALS['HomeDir']=substr($_SERVER['SCRIPT_FILENAME'], 0, strrpos($_SERVER['SCRIPT_FILENAME'], "")); //Rilevo Home directory

require_once "Include/Include.php"; //Inclusioni generali

if (isset($_GET["id"]) and isset($_GET["variabile"]) and isset($_GET["da"]) and isset($_GET["a"])){
    $Nome="storico.csv";
    header("Content-Type: application/text");
    header("Content-Disposition: attachment; filename=".$Nome);
    $Iden=$_GET["id"];
    $Variab=$_GET["variabile"];
    $Start=$_GET["da"];
    $End=$_GET["a"]; 
    if ($GLOBALS['Db']-&gt;connect_error) {
        die("Connection failed: " . $conn-&gt;connect_error);
    }
    if (isset($GLOBALS['Db'])
    $Database=$GLOBALS['Db']-&gt;get_results("SELECT DateTime, Value FROM ".RESTDATA." WHERE (UID = '".$Iden."' AND Field = '".$Variab."' AND DateTime &gt;= '".UnixToMySQLTime($Start)."' AND DateTime &lt;= '".UnixToMySQLTime($End)."' ORDER BY ID ASC;");
    }
    foreach ($Database as $Data){
    print "'".gmdate("d/m H:i", MySQLToUnixTime($Data-&gt;DateTime))."';".$Data-&gt;Value."n"; //Scrivo in tabella dato

}
?&gt;
</code></pre>
