title: MySQL query involving multiple rows, access one based on max value
body: <p>So I am trying to have a single script that accesses all values of a table based on a particular id. The script returns the values in an array using PHP:</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>// Select data from DB 
  $query = 'SELECT * FROM experiences WHERE user_id = ' . $id; 
  $result = mysqli_query($link, $query) or die (mysqli_error($link));
  
  // Not sure this actually creates a 2D array...
  $array = mysqli_fetch_array($result); 
  </code></pre>
  
  <p>However, I realize that I need modified results for particular tasks, such as the row where a particular value is the highest.</p>
  
  <p>How would I go about doing this, and does $array actually hold all the rows and respective fields?</p>