Core Function Printr

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
 
<pre>
 
<pre>
Printr( $variable, <flag> )
+
Printr( $variable, <newline> , <flag> )
 
</pre>
 
</pre>
  
Line 11: Line 11:
 
==== $variable ====
 
==== $variable ====
  
A variable to print its content.
+
A variable to print its content; Arrays and objects are explored recursively with values indented to show structure.  
 +
 
 +
==== <newline> ====
 +
 
 +
Optional; Allows you to set your own NewLine splitter such as "< BR >"
  
 
==== <flag> ====
 
==== <flag> ====
  
Optional; Allows you to set your own NewLine splitter such as "<BR>"
+
Optional; If you would like to capture the output of printr(), use the return parameter. When this parameter is set to TRUE, printr() will return the information rather than print it.
  
 
=== Return Value ===
 
=== Return Value ===
Line 23: Line 27:
 
=== Remarks ===
 
=== Remarks ===
  
Alias' for this command
+
None.
<pre>
+
Print_r()
+
</pre>
+
  
 
=== Example ===
 
=== Example ===

Latest revision as of 12:37, 14 June 2015

Printr( $variable, <newline> , <flag> )

Contents

Description

Prints all details about a variable in a way thats easy for humans to read it (Will print arrays etc)

Parameters

$variable

A variable to print its content; Arrays and objects are explored recursively with values indented to show structure.

<newline>

Optional; Allows you to set your own NewLine splitter such as "< BR >"

<flag>

Optional; If you would like to capture the output of printr(), use the return parameter. When this parameter is set to TRUE, printr() will return the information rather than print it.

Return Value

None

Remarks

None.

Example

$a = array( 0, 1, 2, 3, "moo" => array("cat", "dog", "moo", "toy" => array("fox", "lol")) );
printr($a);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox