Javascript Dynamically Create Array Php Format