I need to read an associated array in reverse order, but don't have access to the PHP4 function Array_reverse() as my provider only runs PHP3.
I need to do this to write a series of linked records to a database. The links are undetermined from the start, I just have a sequence in the array. In order to avoid making a cumbersome previous/next household, I just want write them in reverse order using the mysql_insert_id() to obtain, what will be the 'next' field for the next record--which actually is the previous record... if I can just read them in reverse order.
I use while and each() to traverse the array, but other suggestions are welcome.
Martin