Should I use curly brackets or concatenate variables within strings?
All of the following does the same if you look at the output. $greeting = “Welcome, ” . $name . “!”; $greeting = ‘Welcome, ‘ . $name . ‘!’; $greeting = “Welcome, $name!”; $greeting = “Welcome, {$name}!”; You should not be using option 1, use option 2 instead. Both option 3 and 4 are the … Read more