PHP - Is there a way to verify all values in an array
<p>Using PHP..</p>

<p>Here is what I have.. I'm gonna explain the whole thing and maybe someone can help me with the logic and maybe point me in the right direction.</p>

<p>I have a mail system I am working on. In the cc part, I am allowing the user to seperate the values by a semicolon, like so: 1;2;3;4...</p>

<p>When these values are passed to my function, I am using explode to get them into an array. What I want to do is some checking first. I want to firstly make certain that the format is correct and that every value is correctly seperated. If not, I should show an error. Once this is done, I want to make certain that every number is actually valid. I can query the database, put the reslts into an array and was thinking to use the in_array() function to verify this but I'm not certain that it will work. Can someone please help me out with the best way to handle this?</p>

<p>Thanks.</p>

<p>EDIT:</p>

<p>What is the best way to detect a bogus value in the CSV list of values?</p>
