The echo() function used to display the output on screen
echo ( string $strings ) : void
Parameter Name | Descrption |
---|---|
$strings | Required, Take multiple parameters separated by comma. |
void:: no value is returned
$sting ="Test String"; echo $sting; //Output :: Test String //echo with html text data echo "PHP is scripting language
"; //echo without parentheses echo "Hello World!"; //echo with parentheses echo ("Hello World!"); //echo with multiple parameters echo "PHP ", "is a ", "server-side ","scripting language"; $string1=" Coding"; $string2=" at Qoify.com"; echo "Learn ".$string1.$string2; $a=5; $b=7; echo $a+$b;
1- echo is a language construct, it is not a function, so parentheses are not required.
2- It is a language construct so it can not be called using variable functions
Related Functions