<?php
echo "wellcome !";
?>
echo "wellcome !";
?>
Wellcome !
<html>
<head>
<title>My Page Title here</title>
</head>
<body>
<?php
echo "Hello World ! ";
?>
</body>
</html>
<head>
<title>My Page Title here</title>
</head>
<body>
<?php
echo "Hello World ! ";
?>
</body>
</html>
<html>
<head>
<title>My Page Title here</title>
</head>
<body>
Hello World !
</body>
</html>
<head>
<title>My Page Title here</title>
</head>
<body>
Hello World !
</body>
</html>
You can echo both variables or directly a text, this example will show you how:
Output a variable:
<?php
$myvar = "Wellcome !";
echo $myvar;
?>
$myvar = "Wellcome !";
echo $myvar;
?>
Wellcome !
Output directly a text:
<?php
echo "Wellcome !";
?>
echo "Wellcome !";
?>
Wellcome !
As you see, we have the same displaying text, no difference between putting a text or a variable.
What type of variables can I echo ?
Again, in php there are no types of variables, you can output anythings, strings, numbers, arrays ...
PHP will convert automatically numbers and other type to text so they can be displayed in html pages.