I have a simple array with some values:
$firstArray = array (
['val1'] => 'a',
['val2'] => 'b',
['val3'] => 'c'
);
and I would like to find how many values of this array appear in every line of a MySQL table like this one:
| ID | Name | Val |
| 01 | voice1 | a,c,d,e | // it should return 2 (a and c)
| 02 | voice2 | a,b,c,d,f | // it should return 3 (a,b and c)
The best thing should be to have an array with ID, name, and how many values.