PHP array_values() functionThe array_values( ) function is an inbuilt function of PHP. It is used to get an array of values from another array that may contain key-value pairs. This function was introduced in PHP 4.0. SyntaxParameters
Return ValuesThe array_values( ) function returns an array containing all the values of an array. Important note:The returned array will have numeric keys, starting at 0 and increase by 1. Example 1Output: Array ( [0] =>javatpoint [1] =>udemy [2] =>byjus ) Example 2Output: Array ( [0] => apple [1] => ball [2] => cat ) Example 3Output: Array ( [0] =>mario [1] => need for speed [2] =>igi [3] => road race ) Example 4Output: Array ( [0] =>Narendramodi [1] => 67 [2] => INDIA )
Next TopicPHP Array Functions
|