title: Sort topics by name
body: <p>I have the following function to work with: </p>
  
  <pre><code>function listBrandTopics($params){
    self::_getParam($params,'article_path',Wrapper::basePath().'article/');
  
    $articles = Array();
    $first_pass = true;
    $count = 0;
    while($result['_links']['next'] || $first_pass){
      $count++;
      $first_pass = false;
      $result = $this-&gt;_apiCall(
        Array(
          'path' =&gt; '/brands/'.$params['bid'].'/articles',
          'request_param' =&gt; Array(
            'per_page' =&gt; '100',
            'page' =&gt; $count
          )
        )
      )-&gt;getBody();
      $result = json_decode($result, true);
      $articles = array_merge($articles, array_filter($result['_embedded']['entries'], array($this, '_inSupport')));
    }
  
    array_walk($articles, Array($this, '_articlesProcessor'));
  
    $topics = $this-&gt;_topicId();
  
    $info = Array();
    foreach($articles as $article){
      $topic_id = intval($article['topic_id']);
      foreach($topics as $topic){
        $topic_name = trim($topic['name']);
        if($topic_id == $topic['id']){
          $info[$topic_name]['id'] = $topic['id'];
          if(!is_array($info[$topic_name]['articles'])){
            $info[$topic_name]['articles'] = Array();
          }
          array_push($info[$topic_name]['articles'], $article);
          break;
        }
      }
    }
    $params['current_brand'] = self::$brand_table[$params['bid']];
    $params['the_data'] = $info;
    $params['the_data_json'] = json_encode($info);
    return $this-&gt;_getHtmlTemplate(self::_getParam($params,'template','brandTopics.phtml'),$params);
  }
  </code></pre>
  
  <p>It renders a list of topics and their related articles in a support site. 
  However, this list of topics is not alphabetically ordered. </p>
  
  <p>I know that $topic['name'] is the name of the topic, but how do I get it to return them in alphabetical order? </p>
  
  <p>Thanks for the help! </p>