XML input
Paste your XML below, then press Convert.
Waiting for input.
Convert XML to PHP Array free, right in your browser. Paste your XML input below and press Convert. You get a PHP file with return [...]; that you can include directly. No sign-up, and nothing is ever uploaded.
Paste your XML below, then press Convert.
Waiting for input.
Paste your XML on the left and press Convert. The tool first parses the XML (treating each child of the root element as a row, keeping attributes as @-prefixed columns) into an internal table of rows and columns, then writes it out as PHP Array (emitting short [...] syntax wrapped in a return statement). If the input cannot be parsed you get a plain-English error instead of a broken file.
People reach for this converter when pulling records out of XML feeds, sitemaps or API responses and the data must be consumed by PHP code. Because everything runs locally in your browser, it is also handy for quick one-off migrations without installing database tools or writing throwaway scripts.