Php If Array Has Javascript Function Syntax