note 106001 added to control-structures.foreach

From: Date: Sat, 01 Oct 2011 11:59:42 +0000
Subject: note 106001 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-183579@lists.php.net to get a copy of this message
can any1 please tel me how to put this array in foreach .... Array ( [0] => Array ( [0] => 42 [cat_id] => 42 [1] => NECKLACE SETS [cat_name] => NECKLACE SETS [2] => 0 [cat_parentid] => 0 [childs] => Array ( [0] => Array ( [0] => 49 [cat_id] => 49 [1] => dasdasdssf [cat_name] => dasdasdssf [2] => 42 [cat_parentid] => 42 [childs] => Array ( [0] => Array ( [0] => 55 [cat_id] => 55 [1] => aaa [cat_name] => aaa [2] => 49 [cat_parentid] => 49 [childs] => Array ( [0] => Array ( [0] => 56 [cat_id] => 56 [1] => asasaasasasasa [cat_name] => asasaasasasasa [2] => 55 [cat_parentid] => 55 ) ) ) ) ) ) ) [1] => Array ( [0] => 2 [cat_id] => 2 [1] => SETS [cat_name] => SETS [2] => 0 [cat_parentid] => 0 [childs] => Array ( [0] => Array ( [0] => 43 [cat_id] => 43 [1] => CHAIN SETS [cat_name] => CHAIN SETS [2] => 2 [cat_parentid] => 2 ) [1] => Array ( [0] => 51 [cat_id] => 51 [1] => aaaaa [cat_name] => aaaaa [2] => 2 [cat_parentid] => 2 ) ) ) } this is the print_r im displying . .. but im confused whn putting in foreach ..please help me to sort it out .. thnks in advanced . . :) ---- Server IP: 69.147.83.197 Probable Submitter: 203.188.224.7 ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- https://master.php.net/note/edit/106001 Del: integrated -- https://master.php.net/note/delete/106001/integrated Del: useless -- https://master.php.net/note/delete/106001/useless Del: bad code -- https://master.php.net/note/delete/106001/bad+code Del: spam -- https://master.php.net/note/delete/106001/spam Del: non-english -- https://master.php.net/note/delete/106001/non-english Del: in docs -- https://master.php.net/note/delete/106001/in+docs Del: other reasons-- https://master.php.net/note/delete/106001 Reject -- https://master.php.net/note/reject/106001 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183579) next »