Back to photostream

Dewan Codes - 346

PHP concatenation yielding unexpected results :

 

It could be due to one of the following reasons:

1. Unintended whitespace: If you're concatenating strings with whitespace in between, PHP will treat the whitespace as a separate string.

2. Mixed string types: If you're concatenating strings with different types (such as a string and a number), PHP will automatically convert the number to a string before concatenating it.

3. Unintended variable interpolation: If you're concatenating strings with variables inside them, PHP will automatically interpolate the variables into the string.

2 views
0 faves
0 comments
Uploaded on November 21, 2023