Ok, I know I'm missing something just blatantly obvious here but for the life of me, it's kicking my ass.
I have a JS in my HTML that's calling this Get Checked Mail ID function each time a checkbox is clicked. It's passing a csv of numbers to this function with each checkbox ID. Ex - 9,3,4,2,5
I'm splitting that csv into an array and doing a foreach.
What I'm trying to build is a URL with an array to post with ajax, similar to this:
example.com/api The purpose of this function is to build that URL array and save it to a string.
What I get from this code is the first element in the csv/array (delete_emails[]=9) and none of the others.
I know the csv looks good passed from the JS. What I can't tell because the JS won't run in debug is whether the array is getting populated correctly or my concatenation is screwed up. Which is why for now I'm just setting that EmailTitle to the string it creates.
Thanks.