Jump to content

Search the Community

Showing results for tags 'pipe'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. So a little background I have to create a RSS feed for a crawl for a monitor wall above out studios news desk that only accepts the description field so I have made a page that takes another RSS feed and only displays the description field and adds some spaces then a pipe with a few more spaces and makes it all CAPS Making it look like this CRAWL ITEM 01 | CRAWL ITEM 02 | CRAWL ITEM 03 | The problem is I need the get rid of the ending pipe Making it look like this CRAWL ITEM 01 | CRAWL ITEM 02 | CRAWL ITEM 03 This is what I have so far If anyone can show me how to get rid of the ending pipe would be great. I have read about the implode function but don’t know how to implement it I and very novice with php, most of the code I got off another forum And yes a lot of things are commented out incase I need then in the future Thx <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"> <channel> <?php $rss = new DOMDocument(); $rss->load('http://site.com/temp/rss_clean_feed/sample.rss'); $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed, $item); } $limit = 8; for($x=0;$x<$limit;$x++) { $title = str_replace(' & ', ' & ', $feed[$x]['title']); #$link = $feed[$x]['link']; $description = $feed[$x]['desc']; $description = strtoupper($description); #$date = date('l F d, Y', strtotime($feed[$x]['date'])); echo '<item>' . "\n"; #echo '<title>'.$title.'</title>'; echo '<description>'.$description.' | '; echo '</description>' . "\n"; echo '</item>' . "\n"; } ?> </channel> </rss>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.