print_r function in PHP

Sometimes it is useful to output debugging information about a variable. print_r can help with that. 


print_r function takes two arguments. First one is the text to be displayed, it is a variable that contains a text to be displayed. And the second argument is either 0 or 1. Second argument indicates that first variable contains preformatted HTML text, if it is so, than the value needs to be set to 1 or true.

YouTube video

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator