Php Array Sort By Key Javascript