Core Function Push

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> Push( <array>, <expressions> ) </pre> === Description === Add items to the end of an array === Parameters === ==== array ==== The array to use. === Return Value === ...")
Newer edit →

Revision as of 12:13, 29 November 2011

Push( <array>, <expressions> )

Contents

Description

Add items to the end of an array

Parameters

array

The array to use.

Return Value

Success - Returns how many elements were done.

Failure - Returns 0.

Remarks

None

Example

$array = array ( "One", "Two" );
 
push($array, "Three");
push($array, "Four", "Five");
 
$i = 0;
Foreach ( $array as $i )
{
	println("Element ($i) is: " . $i);
	$i++;
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox