Array Iteration using foreach
<p>I have something like a json array output, it comes like :</p>

<pre><code>{
  "data": [
    {
      "color"
      "size"
      "id"
      "weight"
    },
    {
      "color"
      "size"
      "id"
      "weight"
    },
</code></pre>

<p>And so on.
The array name is called $cars.
I need to loop through all the array and get all car sizes.</p>

<p>something like:</p>

<pre><code>foreach ($cars as $value) {
    $carsize=[data][i][size]
</code></pre>

<p>Thanks.</p>
