Jump to content

Loop Through Two Dimensional Array


Isityou

Recommended Posts

ya can take lots of different ways.

$td = array(
  array('%','&'),
  array('<','>'),
  array(5,6)
);

 

the simplest is using foreach 2 levels

foreach($td as $key => $sd)
{
   foreach($sd as $key => $item)
   {
      $sd[$key]=htmlentities($item);
  }
}

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.