Friday, August 4, 2017

Give an example of Output Variables.

Output Variables

The PHP echo statement is often used to output data to the screen.
The following example will show how to output text and a variable:

Example

<?php
$txt = "W3Schools.com";
echo "I love $txt!";
?>
The following example will produce the same output as the example above:

Example

<?php
$txt = "W3Schools.com";
echo "I love " . $txt . "!";
?>