<i>
COPE wrote:
answered your own question, lol. Did you need me to help you tighten the code up?
-------------------------------</i>
Ya, I did it the hard way... tested, retested, and tested again the behavior of various commands.
<i>
COPE wrote:
One thing I knowticed that doesn't seem right is :
for($i = 0; $i <= 709; $i++){
for($x = 0; $x <= 50; $x++){
if($results[$i][$x] != ""){
$value[$i][] = $results[$i][$x];
} else {
unset(<B>$value[$i][$x]</B>);
}
}
}
so you unset value? if no result found? but that seems like your resivoir after the serch is filtered.
-------------------------------</i>
It is, what I'm doing is searching 50 possible card properties. There are groups of properties to search by, once that group is searched the above code is put in (part I left out checks if more than one of those properties is checked to array_merge into $value, if not do the above code.). the check on results to see if its null is to make sure the same record in $value is cleared, otherwise it will remain in there when it comes time to display the final results or search by another group of properties.
<i>
COPE wrote:
Second it would be more dynamic if you use:
array_count_values(array)
retuns an array containing the values of the <i> array </i> as keys and their frequency as values
then you asort() the array in assending order.
-------------------------------</i>
I thought of this, there are two problems that arise, one is its a multi-dimentional array, array_count_values($value) will return $value(Array=>709), what use is this? And it will also not return anything when a record is unset so it will not return the correct number of records in the array, just the ones with values.
<i>
COPE wrote:
the if that array is NOI empty echo it.. to be honest it's hard to grasp the pourpose of the code. You are matching a result , from somwhere with an array made from a flat file.
then combing that array for the result. So there are duplicate matches, throught the result array?
Then last but not least you echo the 2nd key (value) of th....
-------------------------------</i>
If you take a look at www.ga-games.org/test.php it may help you grasp what I'm trying to do. I've got it all worked out except for how to do a search by user input. Everything seems to do exact value of $array[][*], not be able to search through the field for the input. ie: user enters trig it would search and find $value[0][0] == "<b>Trig</b>ger Happy" Jack.
Mark