Jump to content

Match 2 arays against each other


vicodin

Recommended Posts

Ok so this is what i need to do. I am programming a search engine for my site and pretty much this is how i think i should work but not quiet sure how to do it.

 

1.User Submits a query.(i can code this part)

2. If the query has a white space in it break it into an array. example query ="Playstation 3" It would put playstation and 3 in an array (i can code this part).

3.Go into my database and look at all the products keywords and but them in an array. (I can code this as well)

4.Check my first array against the db array and if they match then output the product stop checking this array against my first array and go the next products keywords until there is no more products. (This is what i dont know how to do. Pretty much the only thing i dont know how to do is the stuff in bold.)

 

Any help would be much appreciated.

 

Thanks all.

Your Friendly Neighborhood Narcotic - Vic.

Link to comment
https://forums.phpfreaks.com/topic/93062-match-2-arays-against-each-other/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.