title: PHP Error - Notice: Array to string conversion on imploding an array
body: <p>I'm trying to write a function that would take the <code>$s</code> parameter and split it into letters thus creating an array of the letters of <code>$s</code>. </p>
  
  <p><code>$n</code> is the letter counter, so it would loop up to 10 letters and return <code>EricEricEr</code>.</p>
  
  <p><strong>The first issue:</strong> I understand I'm creating an array inside an array, and since I would like to receive the string of the inner array, I would need to implode it twice.</p>
  
  <p><strong>The Second issue:</strong> I'm unable to print the 10 first letters, only the word 10 times (i.e. EricEricEricEric...10 times).</p>
  
  <p><strong>Expected Result:</strong> I would like the <code>for</code> loop <code>i</code> to go over the letters, and when reaching <code>$n</code> and print all the letters with no glue, just consecutively, receiving the result of this specific example function params as: <code>EricEricEr</code>.</p>
  
  <pre><code>function letterCounter($s, $n){
      for ($i = 0; $i&lt;=$n; $i++){
          $split [] = str_split($s);
      }
      $imploded = implode($split);
      return $imploded;
  }
  $result = letterCounter('Eric', 10);
  echo '&lt;pre&gt;';
  print_r($result);
  echo '&lt;/pre&gt;';
  </code></pre>