how can i reverse an order of a array without using a built in function like array_reverse() and rsort() .
Why do you not want to use an existing function?
Anyway, one simple way is to loop from the first element to the middle, swapping each element at position i with the element at position i from the back (i.e., swap the first with the last element, then the second with the second last element, until the middle of the array).