PHP Variable Interpolation


<?php
/*
interterpolation property :
it is a unique feature of php which allows fetching values from variables
within double quoted string.
*/
$a = 255;

echo "Value of \$a is $a";

/*single quoted string does not support
a) interpolation
b) escape sequence(\)
*/
echo '<br>Value of \$a is $a';
?>

Output :


YCT Academy of PHP