how to pass and extract string in an array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jiehuang001
Forum Commoner
Posts: 39
Joined: Mon May 12, 2003 12:53 pm

how to pass and extract string in an array

Post by jiehuang001 »

For example, I want to build a search box, where the user can input an array of string such as "term1 term2 term3"
then in the action page, I would build a query such as
select * from the_table where the_term like '%term1%' or the_term like '%term2% or the_term like '%term3%'

Of course, the user can input any number of terms. Is there any function to get the individual string in an array?

Thanks.

Jie Huang
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

Post Reply