Question: what is the difference between echo and print_r in php?
Answer: the difference is that print_r print an array, showing all keys and values,while echo doesnt,and is intended for scalar values.. echo used to print string or HTML content while as print_r used to print an array object means both keys and values.