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, ∼4626🔥, 3💬
Popular Posts:
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to search for the first match of a regular expression using re.search()? The re.search() functio...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...