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} ?>
⇒ json_encode() - PHP to JSON Data Type Mapping
2022-06-29, 3205🔥, 3💬
Popular Posts:
How To Access a Global Variable inside a Function? in PHP? By default, global variables are not acce...
How to include additional claims in Azure AD v2.0 id_tokens? If you want to include additional claim...
Can You Add Values to an Array without Keys in PHP? Can You Add Values to an Array with a Key? The a...
How to send an FTP request with the urllib.request.urlopen() function? If an FTP server supports ano...
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...