What is difference between echo and print_r in php?



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

Answer / Vijay Saxena

echo is a language construct for outputting one or more strings, while print_r outputs the variable type and value. echo does not return any value, whereas print_r returns a string.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Is it more secure to use cookies to transfer session ids?

1 Answers  


what is the default method of form in php?

6 Answers  


What is a substring in php?

1 Answers  


What are new features in php 7?

1 Answers  


What is a persistence cookie?

1 Answers  


What are hooks in php?

1 Answers  


Explain about PHP cookies?

1 Answers  


What is the special meaning of __sleep and __wakeup?

1 Answers  


how to get the value in script values

1 Answers  


Is empty java?

1 Answers  


Php code to find whether a number armstrong or not?

1 Answers  


What are the different ways to login to a remote server?

1 Answers  


Categories