title: I try to sort an array using sort() but it fails
body: <pre><code> if ( $_GET['_value'] == 'moto'  )
       {
          $array[] = array('1' =&gt; 'Yamaha');
          $array[] = array('2' =&gt; 'Suzuki');  
          $array[] = array('3' =&gt; 'Triumph');
          $array[] = array('4' =&gt; 'KTM');
          $array[] = array('5' =&gt; 'Honda');
          $array[] = array('6' =&gt; 'Harley Davidson');
          $array[] = array('7' =&gt; 'Buell');
          $array[] = array('8' =&gt; 'MV Agusta');
          $array[] = array('9' =&gt; 'Ducati');
          $array[] = array('10' =&gt; 'Other');
  
        } 
   $array = sort($array);
   echo json_encode( $array );
  </code></pre>
  
  <p>that is the code i have and its pulled by a chained dropdown. 
  I want it to return the values sorted alphabetically but based on the code you see it returns an empty array. what could be the mistake I am making /</p>