Note: I\'m sorry if this is an extremely simple question but I\'m somewhat obsessive compulsive over the formatting of my code.
I have a class that has a function th
I like this method a little more for Javascript but it seems worth including here because it has not been mentioned yet.
$var = "pizza";
$text = implode(" ", [
  "I love me some",
  "really large",
  $var,
  "pies.",
]);
// "I love me some really large pizza pies."
For smaller things, I find it is often easier to work with array structures compared to concatenated strings.
Related: implode vs concat performance