This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:json_encode [2017/03/28 20:19] jeff |
uphp:functions:json_encode [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
======json_encode====== | ======json_encode====== | ||
+ | |||
< | < | ||
- | JSON encode an array into a string, with optional method | + | < |
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | <span style=" | + | <span style=" |
- | < | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
- | <span style=" | + | <span style=" |
</ | </ | ||
- | Return a string containing the JSON((JSON stands for " | + | Return a < |
====Parameters==== | ====Parameters==== | ||
- | < | + | <html><b>< |
- | < | + | <html><b>< |
- | * **0** - object (default for $method not specified) | + | * **0** - object (default for < |
* **1** - array (without keys) | * **1** - array (without keys) | ||
- | ====Return | + | ====Return |
- | JSON encoded string | + | |
+ | JSON encoded | ||
====Example==== | ====Example==== | ||
Line 62: | Line 64: | ||
====See Also==== | ====See Also==== | ||
- | [[array()]] - Create an array, with optional values | + | [[array()]] - Create an < |
- | [[explode()]] - Turn a string into an array | + | [[explode()]] - < |
- | [[implode()]] - Turn an array into a string | + | [[implode()]] - < |
[[uphp: | [[uphp: | ||