Core Function Clear
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> Clear( <array>, <flag> ) </pre> === Description === Remove all items from an array. === Parameters === ==== array ==== The array to clear. ==== flag ==== Optional; W...")
Newer edit →
(Created page with "<pre> Clear( <array>, <flag> ) </pre> === Description === Remove all items from an array. === Parameters === ==== array ==== The array to clear. ==== flag ==== Optional; W...")
Newer edit →
Revision as of 08:20, 4 October 2013
Clear( <array>, <flag> )
Contents |
Description
Remove all items from an array.
Parameters
array
The array to clear.
flag
Optional; What type of clear to do?
0 = Clear the array and wipe all its elements (same as Unset())
1 = Clear the array but do nothing to its elements other than remove them from the array (no wipe/delete/modify takes place).
Default: 0
Return Value
Success - true.
Failure - false.
Remarks
None.
Example
$days = Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); # Before Clear printr $days; Clear($days); # After Clear printr $days;