title: HTML <pre> word wrapping in PHP doesn't work
body: <p>I've been working on a forum, and I've made everything work as it, and I tried wrapping to see if it works, basically that part of the code looks like this
  before the PHP I got some HTML style:</p>
  
  <pre><code>&lt;style&gt;
      pre {
          white-space: pre-wrap; 
          white-space: -moz-pre-wrap;
          white-space: -pre-wrap;
          white-space: -o-pre-wrap;
          word-wrap: break-word;    
          font-size: 20px;
          margin: 0% 8% 0px 8%; 
      }
  &lt;/style&gt;
  </code></pre>
  
  <p>And then after a bunch of MySQL things</p>
  
  <pre><code>echo '&lt;table style="height: 21px;" width="100%"&gt;';
  while($forumcomrow=mysqli_fetch_array($forumcomres))
  {
      echo '&lt;tr&gt;&lt;td&gt;some text&lt;/td&gt;&lt;td&gt;&lt;pre&gt;Some Very Long Text From Mysql &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/br&gt;';
  }
  echo '&lt;/table&gt;';
  </code></pre>
  
  <p>I removed everything and just left the style for it and the echo for the table, when I echo just the pre tag, it wraps it at the end of the screen, but as soon as I put it in a table (size doesn't matter, even if I put the width of the table to 5px) it still goes 10 miles off the screen until it starts wrapping.</p>
  
  <p>This is what happens:</p>
  
  <p><img src="https://i.stack.imgur.com/kHYNZ.png" alt="This is what happens"></p>
  
  <p>On the picture above you can see one part of it, but the text goes off screen about 5x the length you can see on there, and only then starts wrapping</p>
  
  <p>I have figured out what's giving it a problem, it will wrap the text if it has spaces ("aaaa aaa aaa aa aa") but if its one long word ("aaaaaaaaa") it won't wrap it, I don't know how to fix it, I've just figured out whats causing the problem.</p>