PHP echo() function

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.

Return Value

void:: no value is returned

echo() examples

$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"; echo "Learn ".$string1.$string2; $a=5; $b=7; echo $a+$b;

Related Functions