associative array

Post a reply

Smilies
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: associative array

associative array

by offing » 03/09/2014 2:30 pm

Code: Select all

<?php
$car=array('honda'=>'city',
'toyota'=>'vios',
'ford'=>'fiesta');
foreach($car as $brand => $model){
print_r($brand ."<li>". $model);
echo "</br>";

}
?>
output
1.jpg
1.jpg (5.42 KiB) Viewed 358 times

Top