Thread: Array to List
View Single Post

  #2 (permalink)  
Old 08-11-2003
Chris Boget
 
Posts: n/a
Default Re: [PHP] Array to List

> Coming from ColdFusion, this is difficult. CF has an ArrayToList() function.
> I can't find anything similar in PHP.


implode();

> I'm building a list from an array with the following code, but it puts a
> trailing "," and I need to remove it.


[snip]

$campusList = implode( ', ', $_POST['campus'] );

Simple as that.
Read more about arrays here:

http://www.php.net/manual/en/ref.array.php

Chris

Reply With Quote