How to perform an action every 5 results?

How can I perform an action within a for loop every 5 results? Basically I'm just trying to emulate a table with 5 columns.

By:

Tutor
4.8 (23)

Math and computer tutor/teacher

Tutor
5 (1)

Math Tutor

Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.