using Insertion Sort in PHP