Tuesday, 15 May 2012

php - Multiple nested array from MySQL query -


I am using foreach loops to access archives in the nested array:

  While ($ Row = mysql_fetch_assoc ($ result)) {$ test_groups [$ row ['group_name']] [] = $ line ['lab_test']; } Foreach ($ test_groups $ group_name = & gt; $ as test) {resonant "<">  ". $ Test" & lt; / TD & gt; & Lt; / TR> ";} Echo" & lt; Tr & gt; & Lt; Td> & Amp; Nbsp; & Lt; / Td> & Lt; It works fine [$ Row ['group_name']] [$ row [']';   Group_name ']] [] = $ line [*] [$ row [' group_name ']] [$ line [' group_name ']]' lab test '];  

And how can I adjust it for each loop above?

Assigning an array ]; Foreach will loop:

  foreach ($ dep_name = & gt; $ groups as dollar) {echo $ dep_name; foreign currency {$ Groups $ group_name = & gt; $ as trial} {echo $ group_name; foreign currency ($ test as $ test) {echo $ test;}}  

This is just with echo es, you need HTML.


No comments:

Post a Comment