Include insertion sort in php and javascript