Php Set Empty Array Javascript Function Declaration