Pergunta

I want to impliment tagging system in my PHP project (same like Stackoverflow.com's tagging system). Can I use Lucene? If yes then how to use it in PHP.
Or is there any other jQuery plugin available? Please let me know.

Thanks in advance

Foi útil?

Solução

You can create a new field in your table named "tags" and when you search on your site split the tags (lets say all the tags for each topic is separated by a ',') using split function in PHP with the character you used (in our case, comma (',')).

make a loop for each array of tags for each topic (nested loops) and search for a tag that is the same as you have searched.

hope i helped :)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top