Php Iterate Over Key Value Javascript Array Of Strings