Echo is not a function but it is a constructor, So you are not require parentheses with it. Echo simply mean output all parameters.
How echo is used in PHP.
Echo As String:
<?php
echo “Hello Neepan Tech”;
?>
Echo with Concatenation:
<?php
echo “Hello” . “Neepan Tech”;
?>
Combining two string with the help of echo.
Echo with HTML TAGS:
<?php
echo “Hello” ;
echo “<br />”;
echo “Neepan Tech”;
echo “Html Tags are used in echo in php. <br />”;
?>
Echo with Variable:
<?php
$var1=10;
echo $var1;
echo ” Or it can be used as” . “<br />”;
echo “$var1″;
?>
Echo with Function:
<?php
$a=”Hello Neepan Tech”;
echo strlen($a);
?>
Echo is used to output any parameters. like variable, string, function, HTML Tags, Concatenation.



