Variables in PHP strings
Always concatenate the variables with strings, instead of echoing them inside a string. This saves confusion, and a lot of issues.
so
echo "foo bar" . $foo;
instead of
echo "foo bar {$foo}";
Written by Kasia Gogolek
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Related Tags
#php
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#