Php Codeigniter - Algorithm to generate base string from bank data

1
Good night people, how are things? Let's go to my problem.

I have the data saved this way in the bank:

BasicallyaprojecthasTERMSrelatedtoit.Termsinturnmayhavesynonyms.

Iwantmyfeedbacktobeasfollows(seeprint2)

("$termo" OR "$sinonimo") AND ("$termo" OR "$sinonimo")

This case will only apply if I have 2 terms with 1 synonym each. It may happen that there is only one term without a synonym, or several terms and some with others without synonyms.

Here is an image of what the view would look like and how it should perform.

In this example the first term has two synonyms, the second term only one.

What would be the best way to solve what I want. My knowledge is limited to php and js gambiarras (ajax).

Thank you in advance

asked by anonymous 14.06.2018 / 01:21

0 answers