title: php array index giving errors
body: <p>I have created a php array, and var dumped it.
  In the var dump, I can see a item, but when I try to access that Item, it gives a php error. Here is the var_dump.</p>
  
  <pre><code>array(16) {
      [0]=&gt;
      string(1) "3"
      ["id"]=&gt;
      string(1) "3"
      [1]=&gt;
      string(2) "11"
      ["price"]=&gt;
      string(2) "11"
      [2]=&gt;
      string(13) "Title"
      ["name"]=&gt;
      string(13) "Title"
      [3]=&gt;
      string(15) "String"
      ["seller"]=&gt;
      string(15) "String"
      [4]=&gt;
      string(1) "0"
      ["category"]=&gt;
      string(1) "0"
      [5]=&gt;
      string(347) "String"
      ["description"]=&gt;
      string(347) "String"
      [6]=&gt;
      string(69) "String"
      ["img"]=&gt;
      string(69) "String"
      [7]=&gt;
      string(1) "0"
      ["stock"]=&gt;
      string(1) "0"
  }
  </code></pre>
  
  <p>This piece of code is giving the error. Any help would be nice.</p>
  
  <pre><code>$array["img"]
  </code></pre>
  
  <p>Error Log:</p>
  
  <pre><code>[02-Jul-2017 13:40:30 America/New_York] PHP Notice:  Undefined index: img in myWebPage on line 98
  [02-Jul-2017 13:40:30 America/New_York] PHP Notice:  Undefined index: img in myWebPage on line 100
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>var_dump($product);
  echo $product["img"];
  echo '&lt;div class="card"&gt;
      &lt;img class="card-img-top" src="'.$product["img"].'" alt="'.$product["name"].'" style="height: 200px;"&gt;
          &lt;div class="card-block"&gt;
              &lt;h4 class="card-title"&gt;'.$product["name"].'&lt;/h4&gt;
              &lt;a href="#" class="btn btn-primary"&gt;Buy Now&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;';
  // The array is stored in product.
  </code></pre>