You are looking for json_encode(). Passing an associative array to it will return a JSON representation.
More Related Contents:
- how to use json_encode for my output?
- Extracting data from Json in Php
- How to convert the json image url string into Bitmap image to display images in android application
- PHP display div with select option
- Pretty-Printing JSON with PHP
- Preferred method to store PHP arrays (json_encode vs serialize)
- How to use cURL to get jSON data and decode the data?
- JSON encode MySQL results
- Generate json string from multidimensional array data [duplicate]
- How to parse JSON and access results
- Get data from JSON file with PHP [duplicate]
- Sending JSON to PHP using ajax
- Parsing JSON with PHP
- How to retrieve Request Payload
- PHP decoding and encoding json with unicode characters
- Google GCM server returns Unauthorized Error 401
- How to generate JSON data with PHP?
- How to solve JSON_ERROR_UTF8 error in php json_decode?
- How to access JSON decoded array in PHP
- Using json_encode on objects in PHP (regardless of scope)
- How to loop through PHP object with dynamic keys [duplicate]
- Storing arrays in the database
- Jquery AJAX post to PHP
- How to remove backslash on json_encode() function?
- How do I loop through JSON array
- How to iterate through a nested stdClass? [duplicate]
- PHP: Most frequent value in array
- Json: PHP to JavaScript safe or not?
- Why are escape characters being added to the value of the hidden input
- Read JSON Data Using PHP [duplicate]