C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
PHP EchoPHP echo is a language construct, not a function. Therefore, you don't need to use parenthesis with it. But if you want to use more than one parameter, it is required to use parenthesis. The syntax of PHP echo is given below: void echo ( string $arg1 [, string $... ] ) PHP echo statement can be used to print the string, multi-line strings, escaping characters, variable, array, etc. Some important points that you must know about the echo statement are:
PHP echo: printing stringFile: echo1.php <?php echo "Hello by PHP echo"; ?> Output: Hello by PHP echo PHP echo: printing multi line stringFile: echo2.php <?php echo "Hello by PHP echo this is multi line text printed by PHP echo statement "; ?> Output: Hello by PHP echo this is multi line text printed by PHP echo statement PHP echo: printing escaping charactersFile: echo3.php <?php echo "Hello escape \"sequence\" characters"; ?> Output: Hello escape "sequence" characters PHP echo: printing variable valueFile: echo4.php <?php $msg="Hello JavaTpoint PHP"; echo "Message is: $msg"; ?> Output: Message is: Hello JavaTpoint PHP
Next TopicPHP Print
|