php end() function
Translation results:
英[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() functionsyntax
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() functionexample
<?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:
欧阳克
Popular Recommendations
- Integration vs End-to-End (E Testing: Understanding Their Differences and When to Use Them
- Solar System - Front End Challenge Submission
- I made my first front-end project
- MATIC, NEAR, SHIB Signal Bullish Momentum as Month-End Approaches
- Uniswap (UNI) Agrees To Pay $175,000 To End CFTC Charges
- Will the AVAX Price Reach $100 Before the End of 2024?