matometaru
3/23/2018 - 9:50 AM

データ膨大の時の配列ループ

<?php
	$list = array(
		0 => array (
			'id' => 1,
			'category' => 'cat01',
			'children' => array(
				1 => array('name'=>'','id'=>1),
				2 => array('name'=>'','id'=>2),
			),
		),
		1 => array(
			'id' => 2,
			'category' => 'cat02',
			'children' => array(
				1 => array('name'=>'','id'=>1),
				2 => array('name'=>'','id'=>2),
			),
		),
	);
?>
<?php foreach( $list as $key => $value ): ?>
<?php endforeach; ?>