Php Loop Over Array Javascript Push Apply