$teman = array ("2"=>"Meilana", "4"=>"Ali", "3"=>"Zezen", "1" => "Udin");
print "Data aslinya adalah :
";
foreach ($teman as $tampil => $hasil)
{
print "$tampil = $hasil
";
}
print "Pengurutan data secara ascending
";
ksort($teman);
foreach ($teman as $tampil => $hasil)
{
print "$tampil = $hasil
";
}
print "Pengurutan data secara descending :
";
krsort($teman);
foreach ($teman as $tampil => $hasil)
{
print "$tampil = $hasil
";
}
?>
Minggu, 10 Januari 2010
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar