title: How to echo array data using foreach() in php?
body: <p>I have an array like the one below given. I want to echo this elements one by one. Expected output also added with the post</p>
  
  <pre><code>$myArray =&gt; Array
          (
              [0] =&gt; Array
                  (
                      ['id'] =&gt; 1
                      ['name'] =&gt; "Amla"
                      ['age'] =&gt; 25
                  )
  
              [1] =&gt; Array
                  (
                      ['id'] =&gt; 2
                      ['name'] =&gt; "Kallis"
                      ['age'] =&gt; 35
              )
         )
  </code></pre>
  
  <p>// expected output</p>
  
  <pre><code>1  Amla  25
  2  Kallis 35
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>foreach ($myArray as $key =&gt; $value){
      echo "$myArray[$key]=&gt;$value"."&lt;/br&gt;";
      }
  </code></pre>