SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XML no worky. why?

    Can someone see what I am doing wrong here...

    PHP Code:
    $rss_url "http://xml.thinkspain.com/think-spain-feeds/spanish-news.xml";

    $xml simplexml_load_file($rss_url);

    foreach(
    $xml->item as $item)
    {
    echo 
    $item->title.'<br>'.$item->link.'<br>'.$geoname->description.'</a><hr>';


  2. #2
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,397
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    Change $xml->item to $xml->channel->item
    Salathe
    Software Developer and PHP Manual Author.

  3. #3
    SitePoint Evangelist tangledman's Avatar
    Join Date
    Sep 2005
    Location
    Puerto de Mazarron, Murcia, Spain
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see how that works. thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •