I have an array like a one way list:
array(
\'data1\' => ,
\'next\' => array(
\'data2\' => ,
how about this?
http://php.net/manual/en/function.array-walk.php
http://php.net/manual/en/function.array-reverse.php
If you can tell us what you want to do, it will be easier for us to help you.
EDIT: From your comment I believe you are lookin' for the array_reverse function.
Here is what you're lookin for:
PHP Need to recursively reverse an array