Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • natsort php

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 104
    Comment on it

    Welcome to FindNerd. Today we are going to discuss the function natsort. There are many sorting function available for different types of sorting like usort,asort etc. natsort uses natural order algorithm. It is nothing but to sequence element according to natural manner. It will retutn the true or false in response. Please have a look.

      <?php
        $record_arr = array('rec03','rec002','rec23','rec0334');
        natsort($record_arr);
        print_r($record_arr);
        ?>
    
    result: Array ( [1] => rec002 [0] => rec03 [3] => rec0334 [2] => rec23 )
    

    In above example we pass an array of records and sort it by using natsort.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: