This is an important message requiring you to make a choice if you're based in the EU.
JSON is considered a lightweight data-interchange format which can be parsed and generated easily by PHP or other languages. See how to create and parse JSON data by PHP.
XML (eXtensible Markup Language) is used to store and transport data. Know how to parse XML using php simplexml library with this simple snippet.