wpdb inside foreach loop only returns first result – 2 other similar cases found [closed]

OP found the solution:

Problem solved, found spaces in the array $arrname.

I’m posting as a brief answer to tidy up our site. If anyone would like to up vote it to get the question closed then that would be great 🙂

Alternatively, express your view on the quality of question.