PHPackages                             jepster/loop-tracker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jepster/loop-tracker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jepster/loop-tracker
====================

A simple PHP class for tracking the status of a loop.

04PHP

Since Jun 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jepster/LoopTracker)[ Packagist](https://packagist.org/packages/jepster/loop-tracker)[ RSS](/packages/jepster-loop-tracker/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

LoopTracker
===========

[](#looptracker)

A simple PHP class to output the status of a loop into the standard out via the "echo"-function. The functionality is tested by PHPUnit.

LoopTracker allows you to track the progress via a very handy call:

```
LoopTracker::track('My loop title', count($total_items_to_iterate));

```

There's also a third parameter to pass, which sets the numbers of items which will be processed by one iteration. Default is "1".

So if you process 20 items per iteration, use the following line:

```
LoopTracker::track('My loop title', count($total_items_to_iterate), 20);

```

The full code of the loop looks like so (copied from the PHPUnit testing):

```
for ($i = 0; $i
