User Tools

Site Tools


uphp:functions:json_encode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:json_encode [2017/03/31 13:45]
jeff
uphp:functions:json_encode [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-JSON encode an array into a string, with optional method+<html>JSON encode an <b><span style="color:green">array<span style="color:black"></b> into a <b><span style="color:green">string<span style="color:black"></b>, with optional method</html>
  
 ====Description==== ====Description====
  
-<well size="sm"><html><span style="font-size:125%;color:green">string +<well size="sm"><html> 
-<span style="color:black"></html>[[json_encode]] +<span style="font-size:125%;color:green">string 
-<html>(+<span style="color:black">json_encode (
 <span style="color:green">array <span style="color:green">array
 <span style="color:blue">$array <span style="color:blue">$array
Line 18: Line 18:
 </html></well> </html></well>
  
-Return a string containing the JSON((JSON stands for "JavaScript Object Notation." It is a lightweight format that is used for data interchanging. It is based on a subset of the JavaScript language (the way objects are built in JavaScript).)) encoded representation of an array+Return a <html><b><span style="color:green">string<span style="color:black"></b></html> containing the JSON((JSON stands for "JavaScript Object Notation." It is a lightweight format that is used for data interchanging. It is based on a subset of the JavaScript language (the way objects are built in JavaScript).)) encoded representation of an <html><b><span style="color:green">array<span style="color:black"></b></html>
  
 ====Parameters==== ====Parameters====
  
-<html><span style="color:blue"><b>$array</b><span style="color:black"></html>:  An array to parse+<html><b><span style="color:blue">$array<span style="color:black"></b>:  An <b><span style="color:green">array<span style="color:black"></b> to parse</html>
  
-<html><span style="color:blue"><b>$method</b><span style="color:black"></html>:  Output the JSON code string to represent an //object// or an //array//: +<html><b><span style="color:blue">$method<span style="color:black"></b>:  Optional, output the JSON code <b><span style="color:green">string<span style="color:black"></b></html> to represent an //object// or an //array//: 
-  * **0** - object (default for $method not specified)+  * **0** - object (default for <html><b><span style="color:blue">$method<span style="color:black"></b></html> not specified)
   * **1** - array (without keys)   * **1** - array (without keys)
  
-====Return Value====+====Return Values====
  
-JSON encoded string+JSON encoded <html><b><span style="color:green">string<span style="color:black"></b></html>
  
 ====Example==== ====Example====
Line 64: Line 64:
 ====See Also==== ====See Also====
  
-[[array()]] - Create an array, with optional values+[[array()]] - Create an <html><b><span style="color:green">array<span style="color:black"></b></html>, with optional values
  
-[[explode()]] - Turn a string into an array+[[explode()]] - <html>Turn a <b><span style="color:green">string<span style="color:black"></b> into an <b><span style="color:green">array<span style="color:black"></b></html>
  
-[[implode()]] - Turn an array into a string+[[implode()]] - <html>Turn an <b><span style="color:green">array<span style="color:black"></b> into a <b><span style="color:green">string<span style="color:black"></b></html>
  
 [[uphp:variables|uPHP Variable Types and Limits]] [[uphp:variables|uPHP Variable Types and Limits]]
  
uphp/functions/json_encode.1490967909.txt.gz · Last modified: 2021/09/13 05:56 (external edit)