Rabu, 18 Desember 2013

acak_array

<?php
$angka = array ("a" => "12","d" => "22","b" => "34","c" => "67");

print "Data sebelum di acak =<br>";
foreach ($angka as $tampil => $tampil1)
{
 print "$tampil : $tampil1 <br>";
}

print "Data setelah diacak =<br>";
shuffle($angka);
foreach ($angka as $tampil => $tampil1)
{
 print "$tampil : $tampil1 <br>";
}
?>

0 komentar:

Posting Komentar