I have a functions.php page with a simple textarea, like this:
<tr valign="top">
<th scope="row">Tags:</th>
<td><textarea name="tags" id="tags" cols="40" rows="6"><? echo get_option('tags'); ?></textarea></td>
</tr>
On this form I can paste certain tags like this: tag1 tag2 tag3 tag4 *one tag under another
On my index.php page
$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);
}
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.
Any ideas?
Ty