PHP How to tell if a string contains a certain value
<p>In my SQL database I have a query that turns values in multiple rows into a single concatenated string.  </p>

<pre><code>id    |    image_filename    |    slides    |    languages    |    types
-------------------------------------------------------------------------
10    |    filename.jpg      |    55,4     |        1         |    TN,CQ
</code></pre>

<p>In PHP I am trying to check to see which slides this image is associated with.  If it is associated, that checkbox will be checked.</p>

<pre><code>$isChecked = (strpos($slide,"5") !== false) ? " checked=\"checked\"" : "";
</code></pre>

<p>The problem is that the statement above will return true because there is a 5 contained in there.  What needs to happen is it will return <strong>false</strong> because 5 does not equal 55.</p>

<p>How can I create something in PHP to check the values before each comma, and see if it matches a certain string that I can specify.</p>

<p>Thanks!</p>
