|
Posted by FFMG on 04/20/07 05:22
laredotornado@zipmail.com;61127 Wrote:
> On Apr 19, 4:45 pm, Hendri Kurniawan <ask...@email.com> wrote:
> > laredotorn...@zipmail.com wrote:
> > > Hi,
> >
> > > Using PHP 4.4.4, I have this array
> >
> > > $my_arr = array("a", "b", "c", "d");
> >
> > > What is the easiest way to insert the element "|" between the
> elements
> > > of the array so that the result is
> >
> > > array("a", "|", "b", "|", "c", "|", "d");
> >
> > > ? Thanks, - Dave
> >
> > Easiest, IMHO $my_arr = explode(',', implode(',|,', $my_arr));
> > But someone in this NG bound to find a better way to do it :D
> >
> > Hendri Kurniawan
>
> Beautiful! Concise and accurate. I have given your post the highest
> rating on Google Groups. - Dave
Ah, Google Groups, there goes the 'why' part.
FFMG
--
'webmaster forum' (http://www.httppoint.com) | 'webmaster Directory'
(http://www.webhostshunter.com/) | 'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php)
'Free URL redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=14026
Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).
Navigation:
[Reply to this message]
|