Question: what is difference between print_r and echo in php?
Answer: The difference is that print_r recursively prints an array (or object, but it doesn't look as nice), showing all keys and values. echo does not, and is intended for scalar values. print_r prints human-readable information about a variable, while echo is used only for strings.