title: MySQL To Multidimensional Array
body: <p>Say, I have a mysql table with columns like:</p>
  
  <pre><code>f_name, l_name, score1, score2, score 3
  </code></pre>
  
  <p>Then I want to create a PHP Associatiove Array from a query to get something like:</p>
  
  <pre><code>$array = ('name1'=&gt;65, 'name2'=&gt;45, 'anothername'=&gt;23);
  </code></pre>
  
  <p>the scores e.g <code>65</code> is obtained by adding <code>score1</code>, <code>score2</code> and <code>score3</code> and name is obtained from <code>f_name</code> and <code>l_name</code>.</p>