Curly Braces for Complex String Syntax

::sigh:: our book once again fails at explaining the use of curly braces inside a string - besides being able to make a variable plural without having to make the variable plural in the actual output of the string ie…
[php]<?php
$Vegetable = “carrot”;
echo “

Do you have any {$Vegetable}s?

”;
?>[/php]

why else would you use curly braces in complex string syntax?

Sponsor our Newsletter | Privacy Policy | Terms of Service