Onetastic Macro Documentation >
>
>
Array_PopFront Array_PopFront
Removes and returns the first element in the array. All numerical keys in the array will be modified to start counting from zero while string keys won't be affected. To use an array as a queue, use this function along with Array_PushBack.
Syntax
Mixed Array_PopFront(byref Array array)
Parameters
- Array array
- Array to remove and return the the first element from.
Examples
$array = Array(6, 4, 8, 10, 12)
$firstElement = Array_PopFront($array)
$secondElement = Array_PopFront($array)
$array3[5] = 10
$array3[7] = 12
$array3[9] = 14
Array_PopFront($array3)
Array_PopFront($array3)
$array4[7] = "a"
$array4[-2] = "b"
$array4["size"] = "large"
$array4["color"] = "red"
Array_PopFront($array4)
Array_PopFront($array4)
|