echo - Output one or more strings
echo accepts an argument list and doesn't have a return value. it can be used with or without parentheses: echo or echo().
echo is marginally faster than print.
echo - Output one or more strings
echo accepts an argument list and doesn't have a return value. it can be used with or without parentheses: echo or echo().
echo is marginally faster than print.
Below the syntax of PHP echo
void echo ( string $arg1 [, string $... ] )
<?php
$num = 5;
?>
I have <?=$num?> cars // Output I have 5 cars
<?php
echo "Hello World!"; // Outpul Hello World!
?>
<?php
$msg= "Hello World!";
echo "message is : $msg"; // Output message is : Hello World!
?>
<?php
echo "Hello "World!"; // Output Hello World!
?>