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?
https://secure.php.net/manual/en/function.join.php
$array = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
echo join(' AND ', $array);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community