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/04/06 12:08]
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 <html><b><span style="color:green">array<span style="color:black"></b></html> into a <html><b><span style="color:green">string<span style="color:black"></b></html>, 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"> +<well size="sm"><html>
-<html>+
 <span style="font-size:125%;color:green">string <span style="font-size:125%;color:green">string
-<span style="color:black"> +<span style="color:black">json_encode (
-</html> +
-[[json_encode]] ( +
-<html>+
 <span style="color:green">array <span style="color:green">array
 <span style="color:blue">$array <span style="color:blue">$array
Line 20: Line 16:
 <span style="color:blue">$method <span style="color:blue">$method
 <span style="color:black">] ) <span style="color:black">] )
-</html> +</html></well>
-</well>+
  
 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> 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>
Line 27: Line 22:
 ====Parameters==== ====Parameters====
  
-<html><b><span style="color:blue">$array<span style="color:black"></b></html>:  An <html><b><span style="color:green">array<span style="color:black"></b></html> 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><b><span style="color:blue">$method<span style="color:black"></b></html>:  Optional, output the JSON code <html><b><span style="color:green">string<span style="color:black"></b></html> 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 <html><b><span style="color:blue">$method<span style="color:black"></b></html> 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 <html><b><span style="color:green">string<span style="color:black"></b></html> JSON encoded <html><b><span style="color:green">string<span style="color:black"></b></html>
Line 71: Line 66:
 [[array()]] - Create an <html><b><span style="color:green">array<span style="color:black"></b></html>, 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 <html><b><span style="color:green">string<span style="color:black"></b></html> into an <html><b><span style="color:green">array<span style="color:black"></b></html>+[[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 <html><b><span style="color:green">array<span style="color:black"></b></html> into a <html><b><span style="color:green">string<span style="color:black"></b></html>+[[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.1491480484.txt.gz · Last modified: 2021/09/13 05:56 (external edit)