<?php

require "../functions.php";

$maksimal_provider_per_halaman = 4;
$jumlah_provider = count($array_provider);
$jumlah_halaman = ceil($jumlah_provider / $maksimal_provider_per_halaman);

$array_prov_baru = [];

$b = 0;

for ($j = 0; $j < $jumlah_halaman; $j++) {
    $a = $maksimal_provider_per_halaman;
    while ($a > 0) {
        if ($b < $jumlah_provider) {
            $array_prov_baru[$j][] = $array_provider[$b];
        }

        $a--;
        $b++;
    }
}

?>

