Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to utilize array_values() Function in php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 126
    Comment on it

    why we use array_values() function in php ?

    The array_values() function use for returns an array which have all the values of an array.

    you can see below example:

    <?php
    //firstly create a array of a city detail
    $Citydetail=array("cityname"=>"Adoor","Zipcode"=>"221221","Countryname"=>"India");
    // here $Citydetail is a variable that containing all the values of an array.
    
    //print citydetail value
    print_r(array_values($Citydetail));
    //here use array_value function for return the array
    
    ?>
    

    //output will come

    Array (

    [0] => Adoor

    [1] => 221221

    [2] => India

    )

 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: