英[end] 美[ɛnd]
n.End;<positive>result;termination;last part
vt.& vi.end,termination
Third person singular: ends Plural: ends Present participle: ending Past tense: ended Past participle: ended
php end() function syntax
Function: Point the internal pointer of the array to the last element and return the value of the element (if successful).
Syntax: end(array)
Parameters:
Parameter | Description |
array | Required. Specifies the array to use. |
Description: If successful, return the value of the last element in the array, if the array is empty, return FALSE.
php end() function example
<?php $people = array("西门", "灭绝", "无忌"); echo end($people); //指向最后一个元素 无忌 ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
无忌
<?php $people = array("peter", "无忌", "欧阳克"); echo end($people); //指向最后一个元素 欧阳克 ?>
Run Instance»
Click the "Run Instance" button to view the online instance
Output:
欧阳克