Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse an array upside down?

Tags:

arrays

php

I'm not talking about array_flip(), i want to reverse an array without a numerical/alphabetical basis, just upside down.

Example:

array('music','television','hollywood');

Will be:

array('hollywood','television','music');

Thanks!

like image 357
CodeOverload Avatar asked Dec 02 '22 03:12

CodeOverload


1 Answers

It looks like you'd want to use array_reverse.

like image 87
ClosureCowboy Avatar answered Dec 18 '22 06:12

ClosureCowboy