Utilizor
Contact Us

PHP JSON

Encoding and decoding JSON.

PHP and JSON

JSON stands for JavaScript Object Notation, and is a syntax for storing and exchanging data.

Since the JSON format is a text-based format, it can easily be sent to and from a server, and used as a data format by any programming language.

PHP usage

PHP has detailed support for JSON with the following built-in functions:

  • json_encode() - returns the JSON representation of a value
  • json_decode() - decodes a JSON string into a PHP variable (object or array)