trouble parsing an XML document

From: Date: Sun, 14 Dec 2003 15:32:08 +0000
Subject: trouble parsing an XML document
Groups: php.general 
Request: Send a blank email to php-general+get-172683@lists.php.net to get a copy of this message
Hello, I'm trying to parse a XML doc, but the doc has some tags like: <REG-ORIG> so when I try to initialize variables: class Documenti { var $FILE; //nomefile var $NUMERO; //numerodiserie var ${'REG-ORIG'}; // here is the broblem
    function Documenti($aa) {
        foreach ($aa as $k=>$v)
            $this->$k = $aa[$k];
    }
i have an error: Parse error: parse error, unexpected '$', expecting T_VARIABLE... I tryed changing the $ position: var {$'REG-ORIG'}; // here is the broblem does not change anything: Parse error: parse error, unexpected '{', expecting T_VARIABLE... thanks for any suggestion, Alfredo (Italy)

« previous php.general (#172683) next »