title: generate multi-dimentional array from PHP/MySQL
body: <p>I would like to obtain the same result mith my mysql table. Below my table:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `map_point` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Location` varchar(80) NOT NULL,
    `type` varchar(80) NOT NULL,
    `icon` varchar(70) NOT NULL DEFAULT '',
    PRIMARY KEY (`Id`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=898 ;
  </code></pre>
  
  <hr>
  
  <p>type are Phase1, Phase2...... The final multi-dimentional array must show like this:</p>
  
  <pre><code>$data = array ( "Phase1" =&gt; array("name"=&gt;"Phase 1", "icon"=&gt;"icons/iconb.png"),
                  "Phase2" =&gt; array("name"=&gt;"Phase 2", "icon"=&gt;"icons/icong.png"),
                  "Phase3" =&gt; array("name"=&gt;"Phase 3", "icon"=&gt;"icons/iconr.png"),
                  "Phase2p" =&gt; array("name"=&gt;"Phase 2+", "icon"=&gt;"icons/icony.png"),
                  "Phase3p" =&gt; array("name"=&gt;"Phase 3+", "icon"=&gt;"icons/iconpi.png"),
                  "RollOut2012" =&gt; array("name"=&gt;"Roll Out 2012","icon"=&gt;"icons/iconor.png"),
                  "RollOut120sites" =&gt; array("name"=&gt;"Roll Out 120 Sites", "icon"=&gt;"icons/iconma.png"),                   
  );
  </code></pre>
  
  <p>Thank you in advance for your help.</p>