0

I have multiple foreach loops :

foreach($result as $index1 => $value1)
{
   //count the length of array $value1. That is n value.

   //iterate through the loop n-1 times  
   foreach($value1 as $index2 => $value2)
   {
      //do something
      foreach(...) { }
   }
}

Here I want to run the 2nd foreach loop n-1 times. Is it possible to do so ? or Is there any other way ? thank you for any help

Ahalya Hegde
  • 1,571
  • 2
  • 18
  • 41

0 Answers0