What is the difference between echo print and print_r in php?



What is the difference between echo print and print_r in php?..

Answer / Dharmendra Kumar Pal

echo outputs a string directly to the browser, while print_r prints an organized string representation of a variable that can be useful for debugging. print also exists, which works similarly to echo but allows for multiple arguments.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is $row in php?

1 Answers  


Difference between mysql_connect and mysql_pconnect in php?

2 Answers  


When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?

1 Answers  


How does csrf token work?

1 Answers  


how to upload more than 50 mb? i tried but session was expired....certain time .....i was set session duration three days .... how to rectified? if any one know that post ur answer as soon as possible?already i was increase php.ini but not working......

2 Answers  


What is The difference between ' and " where they can ben in between or outmost and how

2 Answers   Avis Software,


What is php and sql?

1 Answers  


What is a php trait?

1 Answers  


What are escaping characters?

1 Answers  


Why do we use hooks?

1 Answers  


To find out the current year is leap year or not which date() function we've to use.Give the syntax also

5 Answers  


What are the advantages of stored procedures in php?

1 Answers  


Categories