search

From: Date: Tue, 03 Jul 2001 10:10:08 +0000
Subject: search
Groups: php.general 
Request: Send a blank email to php-general+get-55963@lists.php.net to get a copy of this message
Hi all I've got search facility (php-mysql) which is very simple. If i search for 'dog' it will find any records containing words 'dog' or 'dogs' or 'dogowner' etc. But if I search for 'dogs', words 'dog' and 'dogowner' will not be found. This is a classic case so there must be a solution to it but I cannot find one. I tried to do something like if word is 'dogs' then I do the search, then break word 'dogs' into an array and check if the last element is an 's'. If it is remove it, reconstrust the string,which will give 'dog', and do search for that too. Then display results. Well I connot find a way of breaking a string into an array. How do I break 'mynameis' into an array of 8 elements? This has got loopholes but still it is better than what I have now. Thanks Ajdin

« previous php.general (#55963) next »