title: display data in single field of a table
body: <p>I am trying to display name and age in a single field of the table and I want data to be displayed in the place of <code>&amp;nbsp;</code>. I tried the code below but it doesn't work.</p>
  
  <p>CODE:          </p>
  
  <pre><code>&lt;?php
      $con=mysqli_connect("localhost","root","","dva");
      // Check connection
      if (mysqli_connect_errno()) {
         echo "Failed to connect to MySQL: " . mysqli_connect_error();
      }
  
      $result = mysqli_query($con,"SELECT * FROM apform");
  
      while($row = mysqli_fetch_array($result)) {
          echo "My Mood: ";
          echo $row['mood'];
          echo "&lt;br&gt;";
      }
  ?&gt;
  
  &lt;thead&gt;
      &lt;tr&gt;    
          &lt;th&gt;ID&lt;/th&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Doctor&lt;/th&gt;
          &lt;th&gt;Telephone&lt;/th&gt;
          &lt;th&gt;Mobile&lt;/th&gt;
          &lt;th&gt;Meeting Time&lt;/th&gt;
          &lt;th&gt;Fee&lt;/th&gt;
          &lt;th&gt;Date&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td data-title="Name"&gt;&lt;span&gt; &lt;?php echo $row['name']; ?&gt; &lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Relationship"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Address"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Telephone"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Mobile"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Contact at night"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Next of kin"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
          &lt;td data-title="Delete"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>