PHP to check if certain value exist in csv : I've a field in my database which has csv values, if I get the value in a variable it looks like

> ` $data = "dell, dell7, jhon5, doe4";
` 
//these are user id's 

I need to check if a certain id is already in this variable.
I used `explode()` with `foreach()` and it worked well. But, I need to do this in several times and my code become messy.

Is there any other way?

I'm using Laravel(Lumen)

