Php Replace String Array Key Javascript Documentation