Di sini akan memaparkan data dalam bentuk multi-dimensional array
<?php
$negeri = array(
"N9" => array (
"kod" => 05,
"nama" => "Negeri Sembilan",
"ketua" => "Yang DiPertuan Besar"
),
"KN" => array (
"kod" => 03,
"nama" => "Kelantan",
"ketua" => "Sultan"
),
);
echo $negeri['N9']['kod'] . "<br />";
echo $negeri['N9']['nama'] . "<br />";
echo $negeri['N9']['ketua'] . "<br />";
echo $negeri['KN']['kod'] . "<br />";
echo $negeri['KN']['nama'] . "<br />";
echo $negeri['KN']['ketua'] . "<br />";
?>
Disediakan oleh: Mohd Fadil bin Md Sari
Tuesday, 23 October 2018
Papar data dalam bentuk Array
9:44 am
No comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment