I'm pretty sure this is more a php question than a zen cart question, but I've been wrestling with this for hours now.

I've created an array with this:
PHP Code:
while(!$productsMagic->EOF ) {
    
$productsMagicArray = array();
$productMagicArray[] = array('products_model'=>$productsMagic->fields['products_model'],
                                                        
);

$productsMagic->MoveNext();

Then I want to take the results and separate them with commas to insert into another table.

The array is:

Array
(
[0] => Array
(
[products_model] => 51064
)

[1] => Array
(
[products_model] => 11111
)

)

I want to have 51064,11111 to insert in order to be able to send that to an API.

I suspect it's going to be obvious once I see it but right now I'm just missing it....

Thanks in advance for any assistance.