R3m/framework Function reference array.previous

{array.previous(String $selector)}

{array.previous()} — Rewind the internal pointer of an array

{array.previous()} behaves like {array.current()}, with one difference.
It rewinds the internal array pointer one place backward before returning the element value.
That means it returns the previous array value and rewinds the internal array pointer by one.

Returns the array value in the previous place that's pointed to by the internal array pointer, or false if there are no more elements.


This function may return Boolean false, but may also return a non-Boolean value which evaluates to false. Please read the section on Booleans for more information.
Use the === operator for testing the return value of this function.

More information:


Last modified: 2021-06-07

© 2021 universeorange.com