PHP end() Function
Complete PHP Array Reference
Definition and Usage
The end() function moves the internal pointer to, and outputs, the last element
in the array.
This function returns the value of the last element in the array on success.
Syntax
Parameter |
Description |
array |
Required. Specifies the array to use |
Example
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");
echo current($people) . "<br />";
echo end($people);
?>
|
The output of the code above will be:
Complete PHP Array Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|