Php Create New Array Javascript Function