1
Well, the words part is relatively easy. But I can only count one word at a time. It would be possible to do a complete analysis in the database and count all the repeated words, and put the number of times it is repeated next to the word?
Like, I have 5 records in the database and I want to analyze just the TAGS column
1st Record : Php, Mysql, Java
2nd Record : MYSQL, Apostille, Java
3rd Registration : Microsoft, C++, Java
4th Registration : C++, Apostille, Java
5th Record : Apostille, Mysql, Java
As a result I’d like something like this :
Analysis result : Java (5); Mysql (3); Apostille (3); C++ (2); Microsoft (1);
As you can see, in the possible result, the code compares all existing words and count them the same, then displays them in a "grouped"
Instead of storing tags separated by comma, better create a table
registro_tags
. Take the example: Sqlfiddle. To separate this data will be necessary a function.– Lucio Rubens
This type of operation is best performed in the database (with features such as full text search). Doing purely in your PHP application, you will have to read all the records one by one and do this checking with the traditional functions for strings.
– Tasso Evangelista
@luciorubeens create an answer.
– Jorge B.