Limit Items (e.g. News posts)
By Mike Street
If you would like to limit the amount of items coming out of an array (for example the first 5 news items), then before your loop (e.g. while), specify your start and finish points
$A = array_slice($A, START, END);
while $A {
For example, if you did want to only pull out the first 5 news items in an array, you would:
$news_items = array_slice($news_items, 0, 5);
while $news_items {