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 7854777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:11:03+00:00 2026-06-02T20:11:03+00:00

I have an exploded search string, and I need to see if any or

  • 0

I have an exploded search string, and I need to see if any or all parts of it match an entry in a mysql DB table.

If user searches for something like “pour house greensboro”, then “pour house” would match an entry in the table. But the search could also be “$1 beer pour house greensboro, or anything else like that, and in any order, so I need to put each part of the search string together and check to see if it matches what’s in the DB

so, if the parts of the exploded string are just numbers, then I need to check it like this:
0 + 1 + 2 + 3 + 4
0 + 1 + 2 + 3
0 + 1 + 2
0 + 1
0
1 + 2 + 3 + 4
1 + 2 + 3
1 + 2
1
2 + 3 + 4
2 + 3
2
3 + 4
3
4

there could be more or less than 5 parts of the string

is there any way to do this easily?

  • 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-06-02T20:11:04+00:00Added an answer on June 2, 2026 at 8:11 pm

    I figured out how to do this, didn’t think to update this until now…

    (for $i=0; $i < count($search_string); $i++){
        $output = '';
        (for $a=$i; $a < count($search_string); $a++){
            $output = $output." ".$search_string[$a];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to remove any instances of 544 full-text stopwords from a user-entered search
How do i explode this string '||25||34||73||94||116||128' i need to have a array like
I have a mysql/php query which searches through a database and returns matches based
I have a table in MySQL with multiple of reported events (primary key, date
I am creating a simple search feature that queries a user input string for
i have a variable and an user_name i want to search on a string(function_description)
I need to search a string of words against a dictionary of words(txt file)
I have a search function that is supposed to take all the keywords in
I'm working on a search function to take user input and search a mysql
Using explode i have converted the string into array , But the array look

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.