What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP: XML DOM script not returning values

PHP: XML DOM script not returning values
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: PHP: XML DOM script not returning values
PHP code:
$rootarray = $objDOM->getElementsByTagName("Details");
foreach ($roottag1 as $rootval) {

It looks like you used $roottag1 where you meant $rootarray, or vice versa.

Also, your functions use variables that don't exist within the local scope. For example:
PHP code:
function getname() {
    echo "<span id=\"name\">$username</span>";
}

$username would be undefined there. See http://php.net/language.variables.scope.

Oh, and another bug:
PHP code:
if ($clean_strings = 1) {

You probably want to use the equality operator (==), not the assignment operator (=).
01-27-2009 04:18 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP: XML DOM script not returning values - by ryxdp on 01-27-2009 at 03:48 AM
RE: PHP: XML DOM script not returning values - by WDZ on 01-27-2009 at 04:18 AM
RE: PHP: XML DOM script not returning values - by ryxdp on 01-27-2009 at 04:46 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On