php function that converts xml to a usable array.