-
-
//Learn how to use each() function - $prices=Array('Tries' => 100, 'Oil' => 10, 'Spank Plugs' => 4)
while($elements = each($prices)){
- echo $elements['key']; //echo $elements[0];
- echo " - ";
- echo $elements['value']; //echo $element[1];
- echo "
";
- }
-
Copy code
Output results :
Tires-100
Oil-10
Spank Plugs-4
|