The echo command is used in PHP to print any value to the HTML document. Use <script> tag inside echo command to print to the console.
echo "This is GeeksforGeeks Tutorial."; echo variable_name;
Example 1: This example illustrates how to use echo keyword to display content.
GeeksforGeeks A computer science portal
Example 2: This example illustrates how to print a string into the console.
Now, we will see how to write the value of PHP variables to the console line.
Example 3: This example illustrates how to print PHP variables value to the console.