title: foreach loop in Multidimensional Arrays
body: <pre><code>$marks=array(
  array(a1,a2,a3),
  array(b1,b2,b3),
  array(c1,c2,c3)
   );
  </code></pre>
  <p>so i want this in foreach loop</p>
  <p>example</p>
  <pre><code>echo &quot;text-start&quot;.$marks[0].&quot;text11&quot;.$marks[1].&quot;text22&quot;.$marks[2].&quot;text-end&quot;;
  </code></pre>
  <p>and result to be:</p>
  <blockquote>
  <p>text-start<strong>a1</strong>text11<strong>a2</strong>text22<strong>a3</strong>text-end</p>
  <p>text-start<strong>b1</strong>text11<strong>b2</strong>text22<strong>b3</strong>text-end</p>
  <p>text-start<strong>c1</strong>text11<strong>c2</strong>text22<strong>c3</strong>text-end</p>
  </blockquote>
  <p>i tried this  but it show <strong>a1a2a3</strong>  <strong>b1b2b3</strong>
  and i cant add text between them</p>
  <pre><code>for($r=0;$r&lt;count($marks);$r++)
  {
      for($c=0;$c&lt;count($marks[$r]);$c++)
      {
          echo $marks[$r][$c].&quot;test&quot;;
      }
      echo &quot;111&lt;br&gt;&quot;;
  }
  </code></pre>