Php If Array Has Javascript Code Generator