PHP : Menggunakan fungsi shuffle dalam perulangan

$arr = array(
    '2012'      => array(
        array(
            'no'        => 1,
            'nama'      => 'satu',
            'ket'       => '...'
        ),
        array(
            'no'        => 2,
            'nama'      => 'dua',
            'ket'       => '...'
        ),
        array(
            'no'        => 3,
            'nama'      => 'tiga',
            'ket'       => '...'
        ),
    ),
    '2014'      => array(
        array(
            'no'        => 11,
            'nama'      => 'sebelas',
            'ket'       => '...'
        ),
        array(
            'no'        => 12,
            'nama'      => 'dua belas',
            'ket'       => '...'
        ),
        array(
            'no'        => 13,
            'nama'      => 'tiga belas',
            'ket'       => '...'
        ),
    )
);

foreach( $arr as $k => $a )
    shuffle( $arr[ $k ] );

print_r( $arr );

Continue reading