Jump to content

Recommended Posts

Posted

Function //Arguments //Side effect //Return value

current() //one array argument //none //the value from the key/value pair currently pointed to by the internal "current" pointer(or false if no such value)

next() //one array argument //advances the pointer by one. If already at the last element, it will move the pointer "past the end", and subsequent calls to current() will return false. //the value pointed to after the pointer has been advanced (or false if no such value).

prev() //one argument array //moves the pointer back by one. If already at the first element, will move the pointer "before the beginning". //the value pointed to after the pointer has been moved back (or false if no such value).

prev() //one argument array //moves the pointer back by one. If already at the fisrt element, will move the pointer "before the beginning". //the value pointed to after the pointer has been moved back (or false if no such value).

reset() //one argument //moves the pointer back to point to the first key/value pair, or "before the beginning" if the array is empty. //the first value stored in the array, or false for an empty array.

end() //one argument //the pointer ahead to the last key/value pair. //the last value that is currently in the list of key/value pairs.

pos() //one argument //none. (This function is an alias for current().) //the value of the key/value pair that is currently pointed to.

each() //one argument //array moves the pointer ahead to the next key/value pair. //an array that packages the keys and values of the key/value pair that was current before the pointer was moved (or false if no such pair). The returned array stores the key and value under its own keys 0 and 1, respectively, and also under its own keys 'key' and 'value'.

array_walk() //1). An array argument 2). the name of two-(or three) argument function to call on each key/value 3). an optional third argument //this function invokes the function named by its second argument on each key/value pair. Side effects depends on the side effects of the passed function. //returns 1

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.