SimpleXML question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Re: SimpleXML question

Quoted text here. Click to load it

Well, apparently I am mistaken (no surprise there!)

Even though the print_r output doesn't show the title attribute,  
playing around with the asXML() method showed that the parameter was  
actually there.  So trying to drill down further with:

$url = (string)$xml->item[0]->uk->urls->url[0]['title'];
echo $url;

does indeed get me the title of the url.

I guess that just goes to show that I need to give an issue a couple  
more minutes thought before posting... ;-)


Site Timeline