PHP class constant string variable spanning over multiple lines
- by ebae
I want to have a string variable for a PHP class, which would be available to all methods.
However, this variable is quite long, so I want to separate it into multiple lines.
For example,
$variable = "line 1" .
"line 2" .
"line 3";
But above doesn't work.
I tried EOD, but EOD is not allowed within class. And when I declare it outside the class, I can't access the variable from within the class.
What is the best way?