|
SplFixedArray::fromArrayImport a PHP array in a SplFixedArray instance Beschreibung
public static SplFixedArray SplFixedArray::fromArray
( array
$array
[, bool $save_indexes = true
] )
Import the PHP array Parameter-Liste
RückgabewerteReturns an instance of SplFixedArray containing the array content. Beispiele
Beispiel #1 SplFixedArray::fromArray example
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
object(SplFixedArray)#1 (4) {
[0]=>
int(2)
[1]=>
int(1)
[2]=>
NULL
[3]=>
int(3)
}
object(SplFixedArray)#2 (3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
|