I have a bit of a weird issue.
I want to add a div tag around remaining results after a certain amount is reached in my foreach loop.
So, after the loop returns 6 results, it wraps the rest in
The code i have to return results at the moment is:
foreach ($fpbanners as $banners):
<img src="image.jpg" alt="image description" width="773" height="432" />
endforeach;
At the end i need to source code to look something like the following so all results after the 6th is wrapped in the div tag
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
<div class="test">
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
<img src="image.jpg" alt="image description" width="773" height="432" />
</div>
Any help would be greatly appreciated.
Cheers,