title: Divide the string into parts and convert it to an array
body: <p>It is necessary to split the string every 500 symbols, and put every part into array.</p>
  
  <p>Example:</p>
  
  <pre><code>$str = "xx...xxxx" (1550 symbols)
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>array(4) {
    [0]=&gt;
    string(500) "xxx.xx"
    [1]=&gt;
    string(500) "xxx.xx"
    [2]=&gt;
    string(500) "xxx.xx"
    [3]=&gt;
    string(50) "xxx.xx"
  }
  </code></pre>
  
  <p>Tried this way, but this is not what I need:</p>
  
  <pre><code>$arr = str_split($str,500);
  </code></pre>
  
  <p>How to solve this problem in the best way?</p>
  
  <p>Thnx!</p>