Topic: how to filter something out of an array
Hi,
Lets say that I have the next array:
Array
(
[0] => user_id_2-fbcss.png
[1] => userid100_ spongebob - kopie (2).jpeg
[2] => userid2_kierownik stamplaatje definitief 1 - kopie - kopie.jpg
[3] => userid2_spongebob&&&.jpeg
[4] => userid2_spongebob&&&kopie.jpeg
[5] => userid2_test.jpg
[6] => userid3_kierownik stamplaatje definitief 1.jpg
[7] => userid5_kierownik stamplaatje definitief 1 - kopie (2).jpg
[8] => userid5_spongebob - kopie - kopie.jpeg
)
Now I want to count the number of files containing 'userid2'.
I have tried preg_match but I do not understand those expressions and also tried str_replace but till now no luck
Can anyone tell me how I can do that.