Sorting inside awk

I have an array with five columns and i want to write it to a file.
Before writing it i must sort it using the field in the fifth column.

_________________________________________
|field 1|field 2|field 3|field 4|field 5|
|       |       |       |       |       |
|       |       |       |       |       | 
|       |       |       |       |       |
|       |       |       |       |       |
|       |       |       |       |       |
|_______|_______|_______|_______|_______| 

Note that gawk is not available so either i have to write my own sort function or i have to use another way.
Any suggestions?

My advice is to use the unix sort which is by far simpler.
To do a awk sort, you would need to write a sort function which is not elegant

Yeah ok but can i call it inside an awk file, and if yes how.

something likes this?

awk '{print|"sort -k4" }' urfile

Ok but i haven't got a file as an input. I have a table.

Refer to this:
Awk sort

Thanks but didn't make any difference.
My question remains.
I have a multidimensional array inside an awk program. This array has five columns and i want to sort it using the field in the fifth column (btw the field there is arithmetic). Is there a way to do it?
Note that gawk is not an option!