title: Cannot redeclare RecursiveCategories() Error
body: <p>I have this php script:</p>
  
  <pre><code>&lt;?php $categories = $this-&gt;requestAction('categories/topmenu');
      function RecursiveCategories($array)
      {
          if (count($array))
          {
              foreach ($array as $category)
              {
                  if (count($category['children']))
                  {
                      echo '&lt;li &gt;';
                      echo '&lt;a href="/v-n/'.$category['Category']['id'].'-'.$category['Category']['slug'].'" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"&gt;';
                      echo '&lt;div class="sub-menu"&gt;'.$category['Category']['name'].'&lt;/div&gt;';
                      echo '&lt;/a&gt;';
                      echo '&lt;div class="tn-gnavsub"&gt;'; 
                      echo '&lt;div class="gnavsub"&gt;'; 
                      echo '&lt;ul class="menufix"&gt;'; 
                      RecursiveCategories($category['children']);
                      echo '&lt;/ul&gt;';
                      echo '&lt;/div&gt;';
                      echo '&lt;/div&gt;';
                      echo '&lt;/li&gt;'; 
                  }
                  else
                  {
                      echo '&lt;li&gt;&lt;a href="/v-n/'.$category['Category']['id'].'-'.$category['Category']['slug'].'"&gt; '.$category['Category']['name'].'&lt;/a&gt;&lt;/li&gt;';
                  }
              }
          }
  
      }
  ?&gt;
  &lt;?php RecursiveCategories($categories); ?&gt;
  </code></pre>
  
  <p>I get this error: </p>
  
  <blockquote>
    <p>Fatal error: Cannot redeclare RecursiveCategories() (previously declared in :36) in... on line 64</p>
  </blockquote>