title: How to sort the merged arrays in php?
body: <p>I have two arrays</p>
  
  <p>using array_merge function, merged two arrays. Then I need to sort the merged array. </p>
  
  <p>This is my php code</p>
  
  <pre><code>&lt;?php
  $file=file("master.bib");
  $c=count($file);
  
  
  //count of article
  $key = '@article';
  foreach ($file as $l =&gt; $line) {
      if (strpos($line,$key) !== false) {
         $l++;
         $typeart[]= $l;
  
            }
  }//end-count of article
  
  $key = '}';
  foreach ($file as $l =&gt; $line) {
      if (strpos($line,$key) === 0) {
         $l++;
         $typeclose[]= $l;
  
            }
  }
  
  
  
  $p=array_merge($typeart,$typeclose);
  echo sort($p);
  ?&gt;
  </code></pre>
  
  <p>But am getting the output 1. I don't know what's wrong here.</p>