Interpolating with curly braces : String Interpolation « String « PHP






Interpolating with curly braces

 
<?
$preparation = 'Braise';
$meat = 'Beef';
print "{$preparation} and $meat";
?>
  
  








Related examples in the same category

1.Adding "s" to the end of the variable name
2.Embed variables directly into strings
3.Embedded Conditionals
4.Embedding numbers and strings into other strings