why we use print_r() function in php

Description:

The print_r() function is used to print human-readable information about a variable.

Return  Value:

If the variable is an integer or a float or a string the function returns value of the variable. If the variable is an array the function returns keys and elements.