Re: DomNode->attributes() problem

From: Date: Mon, 28 Jun 2004 11:56:03 +0000
Subject: Re: DomNode->attributes() problem
References: 1  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-400@lists.php.net to get a copy of this message
OK the funniest thing is that all this problem happend because of this line: for($i=0; i<count($kaubad); $i++){ var i had a missing "$" char i really hate php error messages ...
<?php class Toode{
    function Toode(){
        $dom = domxml_open_file("tooted.xml");
        $root = $dom->document_element();
        $kaubad=$root->get_elements_by_tagname("kaup");
        for($i=0; i<count($kaubad); $i++){
             $k=$kaubad[$i];
            $nr=$k->get_attribute("nr");
                echo "kauba id: ".$nr."<br>";
        }
    }
} $test=new Toode(); ?>


« previous php.xml.dev (#400) next »