PHP echo() FunctionPHP echo() function is important string function. It is used to display one or more strings. In another words we can say that the echo() function outputs one or more string. Note: The echo() function is a little faster than print().Syntax:
Example 1Output: By using 'echo()' function your string is :Hello JavaTpoint Example 2Output: By using 'echo()' function your string is :Hello JAVA Hello JavaTpoint Example 3Output: Your Shirt color is : Red Note: The shortcut syntax only works with the short_open_tag configuration setting enabled.Example 4Output: Your number value is: (1 + 2) By using 'echo()' function: Addition value is: 3 Example 5Output: Hello John Doe! Example 6Output: Your string is : 'This ','string ','was ','made ','with multiple parameters.' This string was made with multiple parameters. Example 7Output: Peter is 35 years old. Next TopicPHP String |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India