★ wanayoo — archive 1999 http://fr.php.net/manual/function.print-r.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Variables
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this page is not availableDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
Variables
* doubleval
* empty
* gettype
* intval
* is_array
* is_bool
* is_double
* is_float
* is_int
* is_integer
* is_long
* is_numeric
* is_object
* is_real
* is_resource
* is_string
* isset
* print_r
* serialize
* settype
* strval
* unserialize
* unset
* var_dump

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: print_r
View the source code for this pageSearch the site



Previous page
 isset
 Updated
Mon, 08 Jan 2001
serialize 
Next page


print_r

(PHP 4 )

print_r --  Prints human-readable information about a variable

Description

void print_r (mixed expression)

This function displays information about the values of variables in a way that's readable by humans. If given a string, integer or double, the value itself will be printed. If given an array, values will be presented in a format that shows keys and elements. Similar notation is used for objects.

Compare print_r() to var_dump().


<?php
$a = array (1, 2, array ("a", "b", "c"));
print_r ($a);
?>
      

Warning

This function will continue forever if given an array or object that contains a direct or indirect reference to itself or that contains an array or object on a deeper level that does so. This is especially true for print_r($GLOBALS), as $GLOBALS is itself a global variable and contains a reference to itself as such.


 About Notes


Previous page
 isset
 Updated
Mon, 08 Jan 2001
serialize 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.