create a json string from a associative array php code example Example: php json string to associative array $assocArray = json_decode($data, true);