title: Divide text string into sections (separate divs) of 500 characters (or any other # of characters) using PHP?
body: <p>What is the best method for taking a text string (from a mysql database, like a wordpress post or page) and dividing the text into sections of 500 characters (or any other number of characters), and then outputting each 500-character section wrapped in its own div container?</p>
  
  <p>Being new to PHP, I'm not sure how to go about segmenting the content based on character count. We could get the character count using:</p>
  
  <pre><code>&lt;?php
  $content = get_the_content(); //wordpress function for post content as string.
  echo strlen($content);
  ?&gt;
  </code></pre>
  
  <p>But that is as far as my knowledge goes. Can anyone help me out with this challenge?</p>
  
  <p>Let's say I was requesting a page of content from the wordpress database, and it was 5,000 characters long. The goal would be to output 10 divs or spans that each contained 500 characters. </p>
  
  <p>THANK YOU in advance for any assistance.</p>