Answers.Body: <p>This is because you're using an html list <code>&lt;li&gt;</code> element, which by default puts each element on a new line.  You could style away the newline I suppose, but why use it at all...there are a bunch of ways of doing this, but this is one simple one:</p>
  
  <pre><code>{% set developers = entry.GamesDeveloper %}
  {% if developers|length %}
  Developer: 
  {% for developer in developers %}           
      &lt;a href="{{ developer.url }}"&gt;{{ developer.title }}&lt;/a&gt;{% if not loop.last %}, {% endif %}
  {% endfor %}
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T00:32:37.797Z
Answers.Text: I need to be able to keep it within a html list though. I have data before and after that will also b in a list. aka
Answers.UserDisplayName: DevServe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T00:34:13.910Z
Answers.Text: Ok well then you need to style the list I guess - something like `li { display: inline; }` in your css should do it.
Answers.UserDisplayName: Jeremy Daalder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T00:35:22.540Z
Answers.Text: ...but you'll still need to put `Developer:` outside your for loop of course.  And if you want the commas check the `not loop.last` condition....
Answers.UserDisplayName: Jeremy Daalder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T00:26:28.437Z
Answers.LastActivityDate: 2016-12-21T00:26:28.437Z
Answers.UserDisplayName: Jeremy Daalder
Body: <p>I have a FOR loop that should be displaying all the entry titles on one line. But instead, it is outputting them on separate lines. </p>
  
  <p>I want to see:</p>
  
  <pre><code>Developer: Jane Doe, Jim Doe
  </code></pre>
  
  <p>Instead, I am getting:</p>
  
  <pre><code>Developer: Jane Doe
  Developer: Jim Doe
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>{% set developers = entry.GamesDeveloper %}
  
  {% for developer in developers %}
      &lt;li&gt;Developer: &lt;a href="{{ developer.url }}"&gt;{{ developer.title }}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
Tags: <entries><forloop><loop>
Title: Display all entry titles on one line during FOR loop
ThreadText: # Display all entry titles on one line during FOR loop
  
  (Asked by: username_0 on 2016-12-20)
  
  I have a FOR loop that should be displaying all the entry titles on one line. But instead, it is outputting them on separate lines.
  
  I want to see:
  
  ```
  Developer: Jane Doe, Jim Doe
  
  ```
  
  Instead, I am getting:
  
  ```
  Developer: Jane Doe
  Developer: Jim Doe
  
  ```
  
  My code:
  
  ```
  {% set developers = entry.GamesDeveloper %}
  
  {% for developer in developers %}
      <li>Developer: <a href="{{ developer.url }}">{{ developer.title }}</a></li>
  {% endfor %}
  
  ```
  
  **Tags:** entries, forloop, loop
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-21. Score: 4 | Accepted answer
  
  This is because you're using an html list `<li>` element, which by default puts each element on a new line. You could style away the newline I suppose, but why use it at all...there are a bunch of ways of doing this, but this is one simple one:
  
  ```
  {% set developers = entry.GamesDeveloper %}
  {% if developers|length %}
  Developer: 
  {% for developer in developers %}           
      <a href="{{ developer.url }}">{{ developer.title }}</a>{% if not loop.last %}, {% endif %}
  {% endfor %}
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: I need to be able to keep it within a html list though. I have data before and after that will also b in a list. aka  
  > **username_1**: Ok well then you need to style the list I guess - something like `li { display: inline; }` in your css should do it.  
  > **username_1**: ...but you'll still need to put `Developer:` outside your for loop of course.  And if you want the commas check the `not loop.last` condition....  
  
  ---
  
  