Page 1 of 1

array with mysql!!

Posted: Tue Oct 13, 2009 4:56 am
by dheeraj
hi, i want to make a search engine somewhat like google, google seperate the string on the basis of spaces and search all the words in the string...

Problem is that i can search the whole string to database, bt how could searching being done for every single words...

Any reply will appreciated

Thanx

Re: array with mysql!!

Posted: Tue Oct 13, 2009 5:09 am
by Grizzzzzzzzzz
split the string into individual parts...

simple example:

Code: Select all

 
<?php
 
$searchString = "Hello World!"
 
list($part1, $part2) = split(' ', $searchString);
 
?>
 
 
$part1 will now contain "Hello"
$part2 will contain "World!"

Re: array with mysql!!

Posted: Tue Oct 13, 2009 5:13 am
by dheeraj
hey thanx for rply...

what will happen if i inputed a string with uncounted words....