array with mysql!!

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
User avatar
dheeraj
Forum Commoner
Posts: 40
Joined: Fri Feb 06, 2009 11:54 am

array with mysql!!

Post 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
User avatar
Grizzzzzzzzzz
Forum Contributor
Posts: 125
Joined: Wed Sep 02, 2009 8:51 am

Re: array with mysql!!

Post 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!"
User avatar
dheeraj
Forum Commoner
Posts: 40
Joined: Fri Feb 06, 2009 11:54 am

Re: array with mysql!!

Post by dheeraj »

hey thanx for rply...

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