Jump to content

explode input then add them on by on with spaces


HAVOCWIZARD

Recommended Posts

still not getting my search right trying something else, i have explode on the input, setting them to diffrent values, no i do a normal query with the last value if not found loops and the adds the 3rd value with the 4th value " remeber space in between, then run the same query, is there any other easier way..havent ran it yet, just want to get the explode to add automaticly the amount of input words

" hotels new york" so

 

$words = addslashes(str_replace($removal_strings, "", $_POST["inputTxt"]));

$find = explode(" ", $words);

 

$find1 = $find[0]; // hotels

$find2 = $find[1]; // new

$find3 = $find[2]; // york

 

then i run my query anything like the last word....get nothing, works on exact match, "like" no i wanne loop if nothing is found and then add $find2 and $find3 together and then do my query again, because if the input is only new york is should also work, then i can filter the records found in new york and look for the first input "hotels", then is should work perfectly, any ideas.

i know exactly what i want to do but dont know how.

 

i need help on the output of it, need

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.