echo php variable and html in Wordpress

admin

Administrator
Staff member
I am playing around with wordpress and wondering, why this line of code works:

Code:
echo "<a href='....'>$name</a>";

I learned it this way:

Code:
echo "<a href='....'>".$name."</a>";

Is there something special defined in WP to make this work?