Tools, FAQ, Tutorials:
json_encode() Function in PHP
Where to get the detailed description of the json_encode() Function in PHP?
✍: FYIcenter.com
Here is the detailed description of the
json_encode() Function in PHP.
Description - The json_encode() function generates a JSON text string that represents the given PHP value.
Syntax -
string json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 ]] )
Parameters -
Return value - A JSON text string on success or FALSE on failure.
Examples -
<?php $arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); echo json_encode($arr); # The above example will output: # # {"a":1,"b":2,"c":3,"d":4,"e":5} ?>
2018-03-04, 1228👍, 0💬
Popular Posts:
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How to create a new API on the Publisher Dashboard of an Azure API Management Service? If you are ne...
How To Loop through an Array without Using "foreach" in PHP? PHP offers the following functions to a...
Where to find tutorials on introduction of EPUB 2.0.1 Specification? Here is a list of tutorials to ...
How To Support Multiple-Page Forms in PHP? If you have a long form with a lots of fields, you may wa...