PHP natcasesort() Function


SUBMITTED BY: henry1874w

DATE: June 27, 2017, 5:06 p.m.

FORMAT: Text only

SIZE: 279 Bytes

HITS: 381

  1. <?php
  2. $temp_files = array("temp15.txt","Temp10.txt",
  3. "temp1.txt","Temp22.txt","temp2.txt");
  4. natsort($temp_files);
  5. echo "Natural order: ";
  6. print_r($temp_files);
  7. echo "<br />";
  8. natcasesort($temp_files);
  9. echo "Natural order case insensitve: ";
  10. print_r($temp_files);
  11. ?>

comments powered by Disqus