title: PHP sort/reorder the array by specific start on key
body: <p>I want to sort or reorder the array element based on start on value.</p>
  
  <p>My array:</p>
  
  <pre><code>[
      0 =&gt; 'Sun',
      1 =&gt; 'Mon',
      2 =&gt; 'Tue',
      3 =&gt; 'Wed',
      4 =&gt; 'Thu',
      5 =&gt; 'Fri',
      6 =&gt; 'Sat'
  ]
  </code></pre>
  
  <p>$startOn = 3;</p>
  
  <p>Expected Output :</p>
  
  <pre><code>[
      3 =&gt; 'Wed',
      4 =&gt; 'Thu',
      5 =&gt; 'Fri',
      6 =&gt; 'Sat',
      0 =&gt; 'Sun',
      1 =&gt; 'Mon',
      2 =&gt; 'Tue',
  ]
  </code></pre>
  
  <p>I tried using <code>uksort</code> but it does not return the expected output.</p>
  
  <pre><code>uksort($weekDays, function ($a, $b) use ($startOn) {
      return $startOn-$a;
  });
  </code></pre>
  
  <p>Current output :</p>
  
  <pre><code>[
      3 =&gt; 'Wed'
      4 =&gt; 'Thu'
      5 =&gt; 'Fri'
      6 =&gt; 'Sat'
      2 =&gt; 'Tue'
      1 =&gt; 'Mon'
      0 =&gt; 'Sun'
  ]
  </code></pre>