Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7043429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:17:18+00:00 2026-05-28T02:17:18+00:00

I have a functions.php page with a simple textarea, like this: <tr valign=top> <th

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:17:19+00:00Added an answer on May 28, 2026 at 2:17 am

    You could split it on the newline character instead:

    explode("\n", $tags);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so I have a simple login page like this: <fieldset> <legend>Verification</legend> <form method=post action=authentication.php>
I have a simple table for reference page: id name description image In reference.php,
I have a function that I use on index.php page and I would like
I have a simple page in a PHP/MySQL web application that lets admin users
I Have simple PHP functions that produce html links which should delete a record,
I have a simple PHP page (for testing) that simply calls header(Location: http://www.example.com );exit;
I have two PHP functions to calculate the relation between two texts. They both
I have a settings.php file with parametric variables and a functions.php with well, some
I have added a function to functions.php on my theme. function insertAds($content) { $content
I have some setup code in my functions.php file that sets permalinks and adds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.