Php Convert Empty Array Javascript Duplicates On Iphone