title: Managing Array in PHP
body: <p>I'm new to PHP and I need help with managing with arrays. The below codes is extracting data from my SQL database. I need to know how to extract the value inside <code>$resultArray</code>. I strongly believe that <code>$resultArray</code> is an associative array, but I'm not sure how to get the value. </p>
  
  <p>I tried <code>$result = $resultArray['ImageID'];</code> but it doesn't work. I'm certain its retrieving something, by printing it out on my Xcode.</p>
  
  <pre><code>    public function GetImage($imageurl)
      {
          $returnValue = array();
          $sql = "SELECT ImageID FROM `ImageTable` WHERE ImageURL = '$imageurl'";
  
  
          $result = $this-&gt;conn-&gt;query($sql);
          $resultArray = array();
          $tempArray = array();
  
          if ($result != null &amp;&amp; (mysqli_num_rows($result) &gt;= 1)) {
  
              while ($row = $result-&gt;fetch_object()) {
                  $tempArray = $row;
                  array_push($resultArray, $tempArray);
              }
          }
          return $resultArray;
      }
  </code></pre>