Re: DomNode->attributes() problem
[email protected] (jux) Mon, 28 Jun 2004 14:56:03 +0300
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
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();
>
> ?>