Skip to content
Advertisement

Concatenating lang CONST and STR CONST in PHP

Trying to concatenate:

JavaScript

Gives:

JavaScript

But I don’t see anything wrong here, it isn’t a CONST or Static, it’s a simple variable.

Thanks

Advertisement

Answer

Do not do concatenation while declaring class variables.

JavaScript

You can use your constructor function to set such variables.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement