I have three strings:
$str1 = "abc"; $str2 = "def"; $str3 = "ghi";
I can get the value of all of them like this:
echo "$str1$str2$str3";
But I heard there is a way to join them together, so I can echo all of them without quotes.
I have three strings:
$str1 = "abc"; $str2 = "def"; $str3 = "ghi";
I can get the value of all of them like this:
echo "$str1$str2$str3";
But I heard there is a way to join them together, so I can echo all of them without quotes.
You're looking for string concantation.
It's
echo $str1 . $str2 . $str3;
See http://nz2.php.net/language.operators.string for more information.