Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with Yahoo RSS feed - displaying post date

    The php code I'm using below is displaying in the following fashion:

    Pacers Rip Pistons 83-68 to Even Series (AP)
    Indiana's O'Neal Sprains Knee in Game 4 (AP)
    Pirates Sweep Doubleheader With Cubs (AP)
    Bonds Powers Giants to 7th-Straight Win (AP)

    Other, however, display the post date for each headline:

    Pacers Rip Pistons 83-68 to Even Series (AP)
    5/28/04 10:00 PM
    Indiana's O'Neal Sprains Knee in Game 4 (AP)
    5/28/04 10:59 PM
    Pirates Sweep Doubleheader With Cubs (AP)
    5/28/04 11:21 PM
    Bonds Powers Giants to 7th-Straight Win (AP)
    5/29/04 12:21 AM

    ...such as the version that is generated here.

    Can the script I'm using be modified to include the date?

    PHP Code:
    <?php

    require('./class.yahoo.php');
        
    $yahoo = new yahoo_news("http://rss.news.yahoo.com/rss/sports"1);
    $news $yahoo->get_headlines(12);

    ?>

    <?php
    for ($i 0$i sizeof($news['title']); $i++) {
        echo 
    '<p><img align="absmiddle" src="/art/rss.png" alt="" width="26" height="10" border="0">&nbsp;&nbsp;<a target="_top" href="' $news['link'][$i] . '">' $news['title'][$i]. '</a></p>';
    }
    ?>
    Attached Files Attached Files
    Last edited by AshleyQuick; 05-29-2004 at 07:50 AM.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Adelaide, Australia
    Posts
    472
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Probably best to put this question into the PHP forum.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could someone please move this to the php forum?


  •  

    Posting Permissions

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