require_once('Class.php');
$myArray = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); // etc
which is correct?
foreach($myArray as $key => $val) {
$class = new Class();
$result = $class->someMethod($val);
}
or
$class = new Class();
foreach($myArray as $key => $val) {
$result = $class->someMethod($val);
}
Edited to be more specific, using http://simplepie.org/wiki/reference/simplepie/get%5Fitems
$aFeeds = array(rssFeed1,rssFeed2,rssFeed3,...);
foreach($aFeeds as $key => $feedURL) {
$feed->set_feed_url(feedURL);
$feed->init();
$feed->get_items(0, 5);
}