Php Parse String Into Array Javascript Iteration