imagecms/ImageCMS

View on GitHub
application/libraries/mabilis/functions/func.counter.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

    /**
     * Counter function
     */
if (! function_exists('func_counter')) {

    function func_counter() {

        static $count = [];
        static $n;

        $params = func_get_args();
        $count  = func_num_args();

        $n = $n + 1;

        if ($n > $count) {
            $n = 1;
        }

        return $params[$n - 1];
    }

}
/* End of file */