Jump to content

implode() not working as expected


Go to solution Solved by raphael75,

Recommended Posts

I have an array like this:

 

$myarray

Array
(
    [0] => user1@example.com
    [1] => user2@example.com
    [2] => user3@example.com
)

 

When I do:

 

implode(',', $myarray);

 

I get:

 

,user3@example.com

 

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.