foreach 2 ชั้น

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: foreach 2 ชั้น

foreach 2 ชั้น

by offing » 03/09/2014 9:59 am

Code: Select all

<?php

$colour = array("gloss" => array(
"red","yellow","orange"),
"poster" => array("pink","blown","black"),
"pastel" => array("gley","white")
);

foreach($colour AS $type => $col){
echo $type."</br>";
	foreach($col AS $value ){
	echo "<li>".$value."</br>";
	
	}

}

?>
arraycolour.jpg
arraycolour.jpg (11.72 KiB) Viewed 558 times

Top