The "mail" problem came out later or I missed some post about it.
So yes, I would pass that implode via wordwrap then
wordwrap(implode(', ', $list), 100, "\n", false);
please note the space after the coma, to avoid truncated id.
I hope on daily basis you do NOT create arrays with single or double quoted
strings when you need to implode an array of strings ... as I wrote already, if
those where not numbers, that implode did not make sense:
'WHERE id IN ("'.implode('","', array_map('mysql_real_escape_string',
> Date: Thu, 26 Mar 2009 21:01:03 +0800
> From: virgilio.quila...@gmail.com
> To: t...@ezl-data.dk
> CC: email@example.com
> Subject: Re: [PHP] Problems with implode
> >>> Dunno why you guys started talk about utf-8 problems, he has a list of
> >>> ids
> >>> which should contain only unsigned integers, otherwise I do not get how
> >>> that
> >>> query could work with an implode(',', $whatever) rather than 'id in
> >>> ("'.implode('","', array_map('mysql_real_escape_string', $whatever)).'")'
> >>> ...
> >>> so, the problem could be more about missed ids in the array obtaining ,,
> >>> ...
> >>> so, in this case, array_filter before, no?
> >> it's certainly possible. but the way toke described his problem did not
> >> imply that his ids were unsigned integers.
> >> SELECT FROM ... WHERE id IN ('aardvark', 'abacus', 'abbey', ..., 'zulu',
> >> 'zygote');
> > AS written else it is not a problem with either implode nor with string,
> > Only when sending debug info via unformatted mail.
> > Which really should not give this problem, but it does one day I'll have
> > time to figure out exactly what does trigger this error.
> > Regards,
> > Toke
> it is probably the way the email message was formatted.
> it has to cut long lines to email line length limit.
> so you see some numbers are broken ie on different lines.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
News, entertainment and everything you care about at Live.com. Get it now!