All about loop
Fri Jul 01 2022 11:44:58 GMT+0000 (UTC)
Saved by
@patdevwork
// to loop in an associative array to get the keys and values using for each
<?php
$assArray = [
"Subject" => "Mathematics", "Weeks" => 10, "Difficulty" => 8
];
foreach ($assArray as $key => $value) {
echo "The $key is $value <br />";
}
?>
content_copyCOPY
Comments