title: PHP Split String After X Characters Into Separate Word
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9648019/php-str-split-without-word-wrap">PHP: str_split without word-wrap</a>  </p>
  </blockquote>
  
  
  
  <p>Let's say I have this string :</p>
  
  <pre><code>$string = "Lorem ipsum dolor sit amet";
  </code></pre>
  
  <p>and I have character limit on my database : 15 characters. by using str_split($string,15), I got this result :</p>
  
  <pre><code>Array
  (
  [0] =&gt; Lorem ipsum dol
  [1] =&gt; or sit amet
  )
  </code></pre>
  
  <p>this looks ugly to me... how to cut string to the closest word using PHP but the result is like this :</p>
  
  <pre><code>Array
  (
  [0] =&gt; Lorem ipsum
  [1] =&gt; dolor sit amet
  )
  </code></pre>