Php If Array Has Javascript Interview Question