On Thu, 4 Oct 2001 16:27:11 +0200 (CEST), you wrote:
>You could try implode()
>
>$lis = implode(",", $arr);
That'll do it; thanks.
djo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
> What I'm doing here is fairly obvious (build a comma-delimited
>string).
>
> $arr = array(1,2,3,4,5);
>
> for ($i=0; $i< sizeof($arr); $i++) {
> $lis = $lis . $arr[$i];
> if ($i != (sizeof($arr)-1)) {
> $lis = $lis . ',';
> }
> }
>
>
> Question is, is there a
What I'm doing here is fairly obvious (build a comma-delimited
string).
$arr = array(1,2,3,4,5);
for ($i=0; $i< sizeof($arr); $i++) {
$lis = $lis . $arr[$i];
if ($i != (sizeof($arr)-1)) {
$lis = $lis . ',';
}
}
Question is, is there a more elegant way? I
3 matches
Mail list logo