memo.xight.org

日々のメモ

連想配列の走査


$a = array(
	"one"	 => 1,
	"two"	 => 2,
	"three" => 3,
);
foreach ($a as $k => $v){
	echo "\$a[$k] => $v\n";";
}

出力例

$a[one] => 1
$a[two] => 2
$a[three] => 3

一言

  Debug時の $_SESSION の dump に利用