Message-ID:
<c7**********************************@b38g2000prf. googlegroups.comfrom
Igoogler contained the following:
>I'm not quite sure which function to use when I want to add a comma to
the end of every line and a semi colon to the last one. Because it
generates everything on the fly I can't count the rows from a db.
Here's what I want to do:
red, <--Comma
green, <--Comma
blue, <--Comma
orange; <--Last one so semi colon
Any help is greatly appreciated
assuming the above are in an array called $colours
echo implode(",",$colours).";";
But this is so basic, couldn't you have got the answer by looking at the
manual and trying a few examples?
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk -
http://4theweb.co.uk