Home | Programming | Php
Yesterday I introduced PHP variables and demonstrated how they can be set and used by means of a simple example. Today I want to expand on this and show how you can use concatenation to use multiple variables in the same line of code to create more complex and dynamic strings. In PHP, the concatenation symbol is the period symbol as shown at the end of this sentence -> .
<?php $stringVariable = "My lucky number is"; $integerVariable = 11; print $stringVariable . " " . $integerVariable; ?>
Article Source: http://www.writerdatabase.com
www.webdevnotes.com/using-concatenation-with-php-variables/
Please Rate this Article
5 out of 54 out of 53 out of 52 out of 51 out of 5
Not yet Rated