Thursday, 13 October 2016

loop through an associative array in php

Example Associative Array

<?php
$age = array("abc"=>"35", "def"=>"37", "ghi"=>"43");

foreach($age as $x => $x_value) {
    echo "Key=" . $x . ", Value=" . $x_value;
    echo "<br>";
}
?>

No comments:

Post a Comment