Core Function Clear
From Sputnik Wiki
				
				
				(Difference between revisions)
				
																
				
				
								
				|  (Created page with "<pre> Clear( <array>, <flag> ) </pre>  === Description ===  Remove all items from an array.  === Parameters ===  ==== array ====  The array to clear.  ==== flag ====  Optional; W...") | m (1 revision) | 
Revision as of 21:41, 11 August 2014
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;
