Hi everyone,
Hoping some experts can help me out! I'm novice when it comes to coding PHP - I am fairly decent at modifying existing code written by someone else but when it comes to actually writing from scratch , definitely not my domain
So here is what I am doing, I am pulling an RSS feed from instagram and displaying it on a simple php page.
What I'm hoping to do is rather than just end up with a page full of full size images that you have to scroll down is change the picture dimension and have them either part of a table or just straight across in a line... (all the same size of course). I'd really like it to just end up 4 rows of 5 images... Hoping that might be possible?
So here's the code I'm working with:
<meta http-equiv="refresh" content="15" >
<?php
$rss = new DOMDocument();
$rss->load('http://instagram.com/tags/nhl/feed/recent.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 = 20;
for($x=0;$x<$limit;$x++) {
$title = str_replace(' & ', ' & ', $feed[$x]['title']);
$link = $feed[$x]['link'];
$description = $feed[$x]['desc'];
$date = date('l F d, Y', strtotime($feed[$x]['date']));
echo '<p><strong></strong>';
echo '<small><em></em></small>';
echo ''.$description.'';
}
?>