ArticleDirectory
Introduction: This is a detailed page between uset (OJB) and array_values (array) functions. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 329766 'rolling = 'no'>
After uset (array), the index value in the array remains unchanged, and the corresponding value is empty.
So we can use the array_values (array) function to re-generate the index of the array (in the order of 0... n). Otherwise, we will have trouble using the array time.
Array_values definition and usage
The array_values () function returns an array containing all the key values in the given array without retaining the key name.
Syntax
Array_values (array)
Parameters |
Description |
Array |
Required. Specifies the given array. |
Tips and comments
Tip: The returned array uses the value Key, starting from 0 and increasing by 1.
Example
<? PHP $ A = array ("A" => "cat", "B" => "dog", "C" => "horse "); print_r (array_values ($ A);?>
Output:
Array ([0] => CAT [1] => dog [2] => horse
More articles about "golden partner of uset (OJB) and array_values (array) functions"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/329766.html pageno: 12.