CaRP Evolution Documentation
CaRP Evolution Documentation
twitter youtube linkedin google-plus
CaRP Evolution Box
Web This Site

CaRP: Caching RSS Parser - Documentation


CaRP Interactive FAQ
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates

Unordered List Example

The following code will display news headlines as an unordered list:

<?php
require_once "/path/to/carp.php";

// put "unordered list" tags before and after the list of items
CarpConf('bitems','<ul>');
CarpConf('aitems','</ul>');

// put "list item" tags before and after each item
CarpConf('bi','<li>');
CarpConf('ai','</li>');

// display the newsfeed
CarpCacheShow('http://rss.geckotribe.com/rss/0.rss');
?>

To put the items in a bulleted list while avoiding the indentation which is added when using an unordered list (<ul>), do the following:

<?php
require_once "/path/to/carp.php";

// display a bullet before each item
CarpConf('bi','&bull; ');
CarpCacheShow('http://rss.geckotribe.com/rss/0.rss');
?>