PHP Embed Variables Directly Into Strings – String Function

<?php$a = 10;
$b = 15.7;
echo "The value of \$a is $a and the value of \$b is $b\n";
echo 'The value of \$a is $a and the value of \$b is $b\n';
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.