title: Mysql and PHP to display all user data in a html list
body: <p>I have an issue, I'm creating a RSS feed script, although it's only displaying the data all in one row, for example: <strong>MorganJonesMaleYasserkhattak</strong>
  Rather than</p>
  
  <p><strong>Morgan Jones Male</strong></p>
  
  <p><strong>Yasser Khattak</strong></p>
  
  <p>I'm unsure of how to display the data in a Html file so I can display it with CSS style.</p>
  
  <p>Here is my current script:</p>
  
  <pre><code>&lt;?php
  
  // PDO connect *********
  function connect() {
      return new PDO('mysql:host=localhost;dbname=pdo_ret', 'root', 'Af2vaz93j68', array(PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_INIT_COMMAND =&gt; "SET NAMES utf8"));
  }
  
  $pdo = connect();
  
  // posts *******************************
  $sql = 'SELECT * FROM users ORDER BY id DESC';
  $query = $pdo-&gt;prepare($sql);
  $query-&gt;execute();
  $rs_post = $query-&gt;fetchAll();
  
  // The XML structure
  $data = '&lt;html lang="en"&gt;';
  $data .= '&lt;rss version="2.0"&gt;';
  $data .= '&lt;channel&gt;';
  foreach ($rs_post as $row) {
      $data .= '&lt;item&gt;';
      $data .= '&lt;firstname&gt;'.$row['firstname'].'&lt;/firstname&gt;';
      $data .= '&lt;lastname&gt;'.$row['lastname'].'&lt;/lastname&gt;';
      $data .= '&lt;gender&gt;'.$row['gender'].'&lt;/gender&gt;';
      $data .= '&lt;/item&gt;';
  }
  $data .= '&lt;/channel&gt;';
  $data .= '&lt;/rss&gt; ';
  
  ?&gt;
  
  &lt;html&gt;
  &lt;h1&gt;&lt;b&gt;&lt;echo&gt;&lt;?= $data ?&gt;&lt;/echo&gt;&lt;/b&gt;&lt;/h1&gt;
  &lt;/html&gt;
  </code></pre>