Exception or error:
I want to do like this:
$string = "";
$string += "lol"; //maybe =+ > tried but both not working
But it isn’t working, anyone suggestions?
Google isn’t making my life easy (cant search characters like = or +)
How to solve:
In PHP, string concatenation is done with the .
operator:
$string .= 'lol';
+
is for addition.
Answer:
$str = "";
while(...){
$str .= "lol.";
}
Input or place the ellipses with your loop condition, += is an add and increment operator.