Output function in php

Print :

This function displays output on browse and returns value true if output is printed successfully, otherwise it returns false.




Output:   codelack<br/>1


  •  It is  same as print but it does not return any value so  that its performance is faster than print function.
  • We can also print multiple statements with an echo function.




Output: codelackcomtutorial.



using this function we can display the value of variable along with data types.



Output: int (100) string 8  codelack


Using this function we can print variables with the help of format specifiers.



Output :  100 codelack


Using this function, we can display  all elements of array and properties of object.



Output:  array






NOTE : On viewing the source code , the array is shown systematically on the screen.