FANDOM


Prints readable information about a variable.

ArgumentsEdit

void print r ({{{params}}})

Argument InclusionEdit

  • The return parameter was included in PHP 4.3.0

ExamplesEdit

Example 1: Printing a Human Readable list of a variableEdit

It is useful if you are printing to HTML, to encapsulate the output in pre tags (or a monospace font style) so that spacing is kept.

 <?php
 $array = array(array('left', 'right'), array('up', 'down'));
 print_r($array);
 ?>
 

OutputEdit

 Array
 (
    [0] => Array
        (
            [0] => left
            [1] => right
        )
    [1] => Array
        (
            [0] => up
            [1] => down
        )
 

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.