Core Function Printr
From Sputnik Wiki
(Difference between revisions)
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> ==== | ==== <newline> ==== |
Revision as of 08:51, 23 January 2013
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 "
"
<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
Alias' for this command
Print_r()
Example
$a = array( 0, 1, 2, 3, "moo" => array("cat", "dog", "moo", "toy" => array("fox", "lol")) ); printr($a);