Difference between single quotes and double quotes in PHP Coding

Most of us use only Double Quotes ["] when writing PHP code. it seems like the trivial thing to do and most examples out there show this kind of syntax. However, there is also a 2nd way to go and it's the better way to go. Instead of Double Quotes, just use Simple Quotes.

echo "My Name is $name.";

However, using single quotes forces variables to be outside the quotes; instead, you must use theperiod (.) to combine strings. It makes for faster coding but can be more difficult for other programmers to read.

echo 'My Name is ' . $date[?day?] ';

The use of single and double quotes also applies to associative arrays. The associative entry team on the left side needs to have single quotes around it; otherwise, PHP will think it's a define and give you a warning message (only if error reporting is at maximum). I would recommend that the code should look like this:

$SESSION['team'] = $SESSION['old_team'];