echo a variable in php code example
Example 1: php echo variable
<?php
$name = "John Doe";
echo "Hey $name!";
?>
Example 2: php echo html and variable
echo '<img src="' . $Variable . '">';
Example 3: echo php
<?php
$string = "Hello, World!";
echo $string;
?>
Example 4: php variable in echo
echo 'Hello '.$variableName.'!';