I was working on a CakePhp project recently and had an Ajax response returning data in the incorrect order even though CakePhp was actually sorting the data correctly. I thought I would post this handy snippet for anyone that is in a similar position.
[snippet id=”128″]
Enjoy!