Php Get Url Path Javascript Array Sort By Property