Changes

PHP Operators

13 bytes removed, 15:33, 30 May 2007
Concatenation of Numbers and Strings in PHP
</pre>
The above will produce unexpected results (typically it will output a number such as 5). The reason for this is because we have asked PHP to take a string (My Luck number is ), append the number 6 to it (to produce My Luck number is 6) and then final ''arithmetically'' add the number 5 to the string (wihch doesn't make a lot of sense). To resolve this issue we need to tell the PHP pre-processor to perform the addition (6 + 5) ''before'' performing the concatenation. We can achieve thjis this by surrounding the addition expressoin expression in parentheses ''( and )''. Therefore the modified script:
<pre>