* Thus wrote James Johnson ([EMAIL PROTECTED]):
> Hello,
>
> Coming from ColdFusion, this is difficult. CF has an ArrayToList() function.
> I can't find anything similar in PHP.
>
> I'm building a list from an array with the following code, but it puts a
> trailing "," and I need to remove it.
>
> $campusList = "";
> foreach ($_POST['campus'] as $campus_ID){
> $campusList .= $campus_ID;
> $campusList .= ",";
> }
Just need to truncate the last character:
$campusList = substr($campusList,0, -1);
> print($campusList);
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php