Insertion Algorithm In Array In Php