Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Loop through and print all the values of an associative array:
SUBMITTED BY:
henry1874w
DATE:
June 22, 2017, 12:02 a.m.
FORMAT:
Text only
SIZE:
165 Bytes
Raw
Download
Tweet
HITS:
237
Go to comments
Report
<?php
$age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43");
foreach($age as $x=>$x_value)
{
echo "Key=" . $x . ", Value=" . $x_value;
echo "<br>";
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus