Php Pass Variable To Javascript Array Filter Duplicates From An Array