Core Function Shift
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> Shift( <array> ) </pre> === Description === Delete the last item in an array. === Parameters === ==== array ==== The array to use. === Return Value === Success - Ret...") |
m (1 revision) |
||
(3 intermediate revisions by one user not shown) | |||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
− | Delete the | + | Delete the first item in an array. |
=== Parameters === | === Parameters === | ||
Line 17: | Line 17: | ||
Success - Returns the shifted object. | Success - Returns the shifted object. | ||
− | Failure - Returns | + | Failure - Returns empty string. |
=== Remarks === | === Remarks === |
Latest revision as of 12:38, 14 June 2015
Shift( <array> )
Contents |
Description
Delete the first item in an array.
Parameters
array
The array to use.
Return Value
Success - Returns the shifted object.
Failure - Returns empty string.
Remarks
None
Example
$array = array ( "One", "Two", "Three" ); Shift($array); $i = 0; Foreach ( $array as $i ) { println("Element ($i) is: " . $i); $i++; }