title: Storing array data while using foreach
body: <p>I have the following data here.</p>
  
  <pre><code>[places] =&gt; Array
              (
                  [0] =&gt; Drama
                  [1] =&gt; School
                  [2] =&gt; Shounen Ai
                  [3] =&gt; Slice of Life
              )
  </code></pre>
  
  <p>I am trying to store this data into <strong>WordPress</strong> tags, however it's returning only singular letters. </p>
  
  <pre><code>$i = 0;
  foreach($t['places'] as  $tag=&gt;$value){
      $numbers = $i++;
      wp_set_object_terms($post_id , $t['places'][$numbers], "drama_tag",true);
  }
  </code></pre>
  
  <p>This is what it returns, what am I doing wrong?</p>
  
  <p><a href="https://i.stack.imgur.com/yxn0X.png" rel="nofollow noreferrer">please edit the image into the post</a></p>