Reverse the order of ginev array elements

array:reverse(ARRAY $array, BOOL $preserve_keys=TRUE) : ARRAY

array:reverse(["foo" => 1, "bar" => 2])
#=> [ "bar" => 2, "foo" => 1 ]

# note: this function keeps the array keys
array:reverse(["good","bad","ugly"])
#=> [ 2 => "ugly", 1 => "bad", 0 => "good" ]

# note: you can discard the keys
array:reverse(["good","bad","ugly"], false)
#=> [ "ugly", "bad", "good" ]

Copyright ©2013-2022 SunSed®. All rights reserved.