1$a = '12345';
2
3// This works:
4echo "qwe{$a}rty"; // qwe12345rty, using braces
5echo "qwe" . $a . "rty"; // qwe12345rty, concatenation used
6
7// Does not work:
8echo 'qwe{$a}rty'; // qwe{$a}rty, single quotes are not parsed
9echo "qwe$arty"; // qwe, because $a became $arty, which is undefined
1phpCopy#php 7.x
2<?php
3$prefix = "Comfort";
4$suffix = "able";
5echo "{$prefix}{$suffix}";
6?>
7