Social Links via PEAR::Console

Totally Tabular

Console_Table provides:

<?php // -*- fill-column: 80; tab-width: 4; c-basic-offset: 4 -*-
require_once 'lib/magpie/rss_fetch.inc';
require_once
'lib/magpie/rss_parse.inc';
require_once
'lib/Console/Table.php';
define('NL', "\n");

/* using a local copy of the RSS file */
$file = 'del.icio.us.rss.tag.python.xml';
$rss_string = file_get_contents($file);
$rss =& new MagpieRSS($rss_string);

/* output to the console */
echo $rss->channel['title'] . NL;

$table =& new Console_Table();
$table->setHeaders(array('Title', 'Added'));
foreach (
$rss->items as $item) {
    
$title = substr($item['title'], 0, 50);
    
$table->addRow(array($title, $item['dc']['date']));
}
echo
$table->getTable();
?>

console output