# Programmers - What method do you use to display comma seperated lists correctly?

**URL:** https://boards.straightdope.com/t/programmers-what-method-do-you-use-to-display-comma-seperated-lists-correctly/580604
**Category:** Factual Questions
**Created:** [May 3, 2011, 7:10pm UTC](https://boards.straightdope.com/t/programmers-what-method-do-you-use-to-display-comma-seperated-lists-correctly/580604 "2011-05-03T19:10:29Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)
#### Post date: [May 3, 2011, 7:14pm UTC](https://boards.straightdope.com/t/programmers-what-method-do-you-use-to-display-comma-seperated-lists-correctly/580604/2 "2011-05-03T19:14:03Z")

</div>

> [@Programmers - What method do you use to display comma seperated lists correctly?](https://boards.straightdope.com/t/programmers-what-method-do-you-use-to-display-comma-seperated-lists-correctly/580603/2):
>
> I’d just use the built-in join function in Perl:
> 
> $str = join “,”, @list;

So that joins the values together with a comma? Is there a PHP equivalent? (I’ll google)

edit: Looks like there is one. I’ll use this in future 🙂

> **[PHP: join - Manual](https://www.php.net/manual/en/function.join.php)**
>
> Alias of implode

---

_[View the full topic](https://boards.straightdope.com/t/programmers-what-method-do-you-use-to-display-comma-seperated-lists-correctly/580604)._
