RE: [PHP] Fatal error: Call to a member function on a non-object (again)
| From: | Sandeep Murphy | Date: | Thu, 17 Jan 2002 18:48:55 +0000 |
| Subject: | RE: [PHP] Fatal error: Call to a member function on a non-object (again) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80954@lists.php.net to get a copy of this message | ||
hi again,
One other strange thing that I didnt mention before.. if I insert(type) the
xml data directly within the parser or refer to an external xml file, it
runs fine but if I try to dynamically send the xml data to the parser , I
repeatedly kept getting the fatal error ..
thnx,
sands
-----Original Message-----
From: Jason G. [mailto:blair@nb.net]
Sent: quinta-feira, 17 de Janeiro de 2002 18:41
To: Sandeep Murphy; php-general@lists.php.net
Subject: Re: [PHP] Fatal error: Call to a member function on a
non-object in example 1.php on line 66
First of all, make sure the $root->children() returns an array of objects.
Second of all, remove the space between $All_nodes and [1].
Your code should look like:
$childNodes=$All_nodes[1]->children();
If that does not work, you may have to create a temp var to use...
$tmp = $All_nodes[1];
$childNodes=$tmp->children();
-Jason Garber
IonZoft.com
At 06:21 PM 1/17/2002 +0000, Sandeep Murphy wrote:
>Hi,
>
>I keep getting this error "Fatal error: Call to a member function on a
>non-object in /www/html/smurthy/example1.php on line 66" and simply unable
>to figure out why this is occuring..
>
>64 $root = $dom->root();
>
>65 $All_nodes = $root->children();
>
>66 $childNodes=$All_nodes [1]->children();
>
>can anyone help me out pleaseee
>
>TIA,
>sands
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net