Jump to content

implode() not working as expected


raphael75

Recommended Posts

I have an array like this:

 

$myarray

Array
(
    [0] => [email protected]
    [1] => [email protected]
    [2] => [email protected]
)

 

When I do:

 

implode(',', $myarray);

 

I get:

 

,[email protected]

 

The 1st 2 elements are missing. I have another array that looks exactly like the one above but it has 15 elements, and when I do the same exact implode() statement I get a comma-separated list with all 15 elements.

 

Why is implode() missing the 1st 2 elements?

 

Thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/286110-implode-not-working-as-expected/
Share on other sites

there's something about your actual data or something about how you are displaying/using the data that is causing it to not appear when being viewed or used.

 

if this is being output in a browser, what does the 'view source' of the output look like?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.