title: Display string to a maximum of so many characters without splitting word
body: <p>I am currently working on a php project where I need to display a string up to a maximum of 100 characters but without splitting the word. </p>
  
  <p>For example if I have the string</p>
  
  <blockquote>
    <p>The quick brown fox jumped over the lazy dogs back</p>
  </blockquote>
  
  <p>Say the 100th character is in the middle of 'jumped'. 
  At the moment I am using <code>substr($mystring, 0, 100)</code></p>
  
  <p>This will then print </p>
  
  <blockquote>
    <p>The quick brown fox jum</p>
  </blockquote>
  
  <p>Instead in this case I would want to print</p>
  
  <blockquote>
    <p>The quick brown fox</p>
  </blockquote>
  
  <p>Is this possible to fix</p>