Page 1 of 1

PHP search form

Posted: Wed Jun 23, 2004 1:03 pm
by jdizzle
I'm trying to make a PHP search form for a webcomics. This is what I have so far.

I have a textfield and a search button that collects the keywords that the person wants. In another PHP file, I have an array that contains keywords that correspond to the comics in an error.

For example, $keyword[0] would contain keywords that would go with the very first comic, $keyword[36] would contain keywords that would go with the 37th comic.

What I want it to do is to take the keywords from the textfield and to search the keywords in the array. If there is a match, I want it to list the search result.

Here are some problems I ran into one.

1) If a person puts in a keyword that applies to more than one comic then it would list that comic twice.

2) I need to create another array but I'm having trouble instantiating it. For instance, if I have an array that I want to have 37 different values, how do I instantiate it so that it has 37 directories?

Posted: Thu Jun 24, 2004 2:46 am
by Grim...
Got any code to show us?

Posted: Thu Jun 24, 2004 3:00 am
by feyd
I'd like to know a little more, like how $keyword[n] is layed out.. is it a string, array, resource tree, keg of beer?