Search Results

  1. Learn how to use the print_r function in PHP to display human-readable information about a variable's contents. Includes syntax, parameters, and examples.

    • Gettype

      gettype (PHP 4, PHP 5, PHP 7, PHP 8) gettype — Get the type...

    • Floatval

      Return Values ¶ The float value of the given variable. Empty...

    • Boolval

      boolval (PHP 5 >= 5.5.0, PHP 7, PHP 8) boolval — Get the...

    • Settype

      settype (PHP 4, PHP 5, PHP 7, PHP 8) settype — Set the type...

    • Serialize

      Parameters ¶ value The value to be serialized. serialize ()...

    • Intval

      intval (PHP 4, PHP 5, PHP 7, PHP 8) intval — Get the integer...

    • Doubleval

      Alias of floatval

    • Isset

      Determine if a variable is considered set, this means if a...

  2. The PHP print_r() function displays information about a variable in a human-readable format.

  3. Jul 11, 2025 · Your All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more.

  4. print_r () displays information about a variable in a way that's readable by humans. print_r (), var_dump () and var_export () will also show protected and private properties of objects with PHP 5. Static class members will not be shown. Remember that print_r () will move the array pointer to the end. Use reset () to bring it back to beginning.

  5. Aug 19, 2022 · The print_r() function is used to print human-readable information about a variable.

  6. The PHP Variable Handling print_r () function is used to display information about a variable in an understandable format. It is useful for checking the contents of an array or object. This function prints the data in a simple format, including keys and values. It works with a variety of data types, including numbers, texts, arrays, and objects.

  7. People also ask

  8. PHP- print_r () Function In this article, we will go over the PHP print_r () function. The print_r () function is a function which can be used to show the contents, or make-up, of an array. Let's say, for example, we create the following array in PHP.