hey there i have this array:
array(1) {
[\"dump\"]=>
string(38) \"[\"24.0\",24.1,24.2,24.3,24.4,24.5,24.6]\"
}
my question:
reset() and end() does exactly this.
From the manual:
reset(): Returns the value of the first array element, or FALSE if the array is empty.
end(): Returns the value of the last element or FALSE for empty array.
Example:
Which outputs:
float(24)
float(24.6)
DEMO
NOTE: This will reset your array pointer meaning if you use current() to get the current element or you've seeked into the middle of the array, reset() and end() will reset the array pointer (to the beginning and to the end):