echo with string and variable in php code code example Example: php echo variable <?php $name = "John Doe"; echo "Hey $name!"; ?>