Senin, 04 Januari 2010

PHP : ACAK ARRAY

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

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

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

Tidak ada komentar: