How to use echo in PHP

In this article, I will explain how the echo() function can be used in PHP.
  • 1284

echo() function in PHP

  • The echo() function is used to output one or more strings.
  • In echo() function, you are not required to use parentheses with it.
  • The echo() function will generate a parse error, if you want to pass more than one parameter to echo().




  • string string is required parameter. one or more string can be used to be output.


The following example show to how the echo() function can be used in PHP.



<h3 style="color: gray;">echo() function example in PHP</h3>


    $string = "C-sharpcorner";

    echo $string;

    echo "<br />";

    echo $string."<br />Welcome to all user's....";






You may also want to read these related articles here
Ask Your Question 
Got a programming related question? You may want to post your question here


More Articles

© 2019 DotNetHeaven. All rights reserved.