Re: Mysql search html tags excluded
| From: | tedd | Date: | Fri, 04 Jun 2010 13:25:39 +0000 |
| Subject: | Re: Mysql search html tags excluded | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-305817@lists.php.net to get a copy of this message | ||
At 2:12 PM +0300 6/4/10, Tanel Tammik wrote:
Hello, if there is some webpage content with html tags in database is it possible to search it without tags? data : '<div style="">you need some styling!</div>' when i now search for 'you style' i don't want to get any rows! is it possible? when i search 'you styling' i get the row! Br TanelTanel: If your database has html tags in it, then it's pretty simple to grab the data from the db and preform strip_tags(). After which you can search what's left. If you want to have the db do the search, then look in to "full text" to do the searching for you. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com