It just result in
1 AND 2 AND 3 AND
I don't know what you want to get and what your result is, can you explain that?
.= will surely work, but have you thought about join?
$array = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; echo join(' AND ', $array);
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.