• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multi dimensional arrays in PHP

#2
[eluser]CroNiX[/eluser]
Code:
foreach($contacts as $groupname => $groups)
{
  echo "<h1>$groupname</h1>";

  foreach($groups as $group)
  {
    echo $group['contactValue'] . '<br />';
  }
}

PS - For SEO, only 1 H1 tag allowed per page.


Messages In This Thread
multi dimensional arrays in PHP - by El Forum - 07-16-2012, 09:18 AM
multi dimensional arrays in PHP - by El Forum - 07-16-2012, 09:30 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.