<?php

    function createPageNavigator($data){
        $nav = '';
        $prev = $data->previousPageUrl();
        $next = $data->nextPageUrl();
    
        if($prev != null){
            $nav .= '<a href="'.$prev.'">Prev</a>';
        }
        
        if($prev != null && $next != null){
            $nav .= ' | ';
        }
        
        if($next != null){
            $nav .= '<a href="'.$next.'">Next</a>';
        }
        return $nav;
    }

    function rupiah($nilai)
    {
    	$hasil = number_format($nilai,0,',','.').',-';
    	return 'Rp '.$hasil;
    }
    function rupiahBasic($nilai)
    {
    	$hasil = number_format($nilai,0,',','.').',-';
    	return $hasil;
    }

    function convertMonth($tanggal){
         $bulan = array (
         1 =>   'Januari',
         'Februari',
         'Maret',
         'April',
         'Mei',
         'Juni',
         'Juli',
         'Agustus',
         'September',
         'Oktober',
         'November',
         'Desember'
         );
        
         return $bulan[(int)$tanggal];
    }
    
?>