i have a Table in MySql with Cities.
|---------------------|------------------|
| ID | City |
|---------------------|------------------|
| 1 | Berlin |
|---------------------|------------------|
| 2 | Los Angeles |
|---------------------|------------------|
| 3 | Shanghai |
|---------------------|------------------|
and i have a String in Php like this: $string = "I like Berlin and Los Angeles."
Now i want look in the MySql-Database if the String contains a City/Cities. But i dont know what is the best solution. Maybe its better or/and faster to have the List with Cities as Json File?
" ", put them in a loop & check if you find any words in common .