Hi All,
I am still learning PHP and have a question about the use of brackets and variables.
$id = $_GET[“id”];
$name = $_GET[“name”];
echo “
” . $id . “: {$name}”;
When I originally wrote this I put brackets around both $id and $name, but received an error. I experimented with the brackets because I am still not sure when they are required and got it to work, but I don’t know why. Why would you not need brackets for both? Why does putting brackets around both produce an error? Thanks ahead for any explanation.
Jim