In some previous post you can use
current($array)
instead of
$array[key($array)]
I think it's more self-explaining.
![]() | end![]()
Flavio Ventura
30-Nov-2005 12:02
In some previous post you can use
ken at expitrans dot com
28-Oct-2005 12:02
Please note that from version 5.0.4 ==> 5.0.5 that this function now takes an array. This will possibly break some code for instance:
mika dot stenberg at helsinki dot fi
11-Aug-2005 09:24
Here's something useful with arrays that I did: change an items position up or down in array. Thanks to previous posters for some useful functions (included):
12-May-2005 04:21
Fix for unknown writer of 29-aug-2002.
user at mail dot com
02-Mar-2005 11:29
It may be obvious, but if the array is empty, end() returns bool(false).
29-Aug-2002 09:34
If you need to get a reference on the first or last element of an array, use these functions because reset() and end() only return you a copy that you cannot dereference directly:
29-Aug-2002 09:17
When adding an element to an array, it may be interesting to know with which key it was added. Just adding an element does not change the current position in the array, so calling key() won't return the correct key value; you must first position at end() of the array: | ![]() |