$bbt = array( "Sheldon" , "Leonard", "Penny", "Raj", "Howard" ); echo join( ', ', $bbt) ; // urutkan $bbt dan cetak hasilnya echo sort($bbt); // urutkan $bbt terbalik dan cetak hasilnya echo rsort($bbt);
0 jempol
bramanto
300
1167
·
9 tahun, 4 bulan yang lalu
·
1 jempol
Salam Diskusi,
Hai Coder @rally, sintaks code yang coder tuliskan sudah benar, namun kurang tepat. Coder dapat memodifikasi sintaksNya seperti ini.
$bbt = array( "Sheldon" , "Leonard", "Penny", "Raj", "Howard" );
echo join( ', ', $bbt) ;
// urutkan $bbt dan cetak hasilnya
sort($bbt);
echo join(', ', $bbt);
// urutkan $bbt terbalik dan cetak hasilnya
rsort($bbt);
echo join(', ', $bbt);
rally
55
1
penanya
·
9 tahun, 4 bulan yang lalu
·
1 jempol
salam diskusi, thanks coder @bramanto,, aku lanjut belajar lagi ,