array_values( ) returns an array of all the values in that array : array_values « Data Structure « PHP






array_values( ) returns an array of all the values in that array

 
<?
    $words = array("Hello", "World", "Foo", "Bar", "Baz");

    var_dump($words);

    asort($words);

    var_dump($words);

    var_dump(array_values($words));
?>
  
  








Related examples in the same category

1.Return all the values of an array
2.array_values() function returns an array containing all of the values constituting the input array.
3.Getting and Displaying Counts of Array Values