Script that take the tags from a form and splits them inside an array
<p>I have a functions.php page with a simple textarea, like this:</p>

<pre><code>&lt;tr valign="top"&gt;
&lt;th scope="row"&gt;Tags:&lt;/th&gt;
&lt;td&gt;&lt;textarea name="tags" id="tags" cols="40" rows="6"&gt;&lt;? echo get_option('tags'); ?&gt;&lt;/textarea&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>On this form I can paste certain tags like this:
tag1
tag2
tag3
tag4
*one tag under another</p>

<p>On my index.php page </p>

<pre><code>$tags = get_option('tags');  // I pull all my submitted tags inside the $tags variable
if ($tags != ''){
    $tag = preg_split('/ /', $tags); // The problem is here
    $tag = array_map('trim', $tag);
}
</code></pre>

<p>I need a way to split the tags. I am trying to split the tags by the space between them (like in the preg split function) - but being a list of tags, one under the other there are no spaces.</p>

<p>Any ideas?</p>

<p>Ty</p>
