how to check if a string exists in an array of strings
<p>I have data stored in a string: such as <code>$string='12';</code><br>
'12' represents 2 pieces of data, <code>1</code> and <code>2</code>  </p>

<p>In 3 columns, I have those same ids stored,  the array comes out as :</p>

<pre><code>ex1: $array= ('num1' =&gt; 1, 'num2' =&gt; 2, 'num3' =&gt; )
ex2: $array= ('num1' =&gt; 5, 'num2' =&gt; 4, 'num3' =&gt; 3)
</code></pre>

<p>How could I compare these and return true if the numbers exist in both places? </p>

<p>For instance: using the above example:
for ex1:
<code>12</code> would <code>return TRUE</code></p>

<p><code>34</code> would <code>return FALSE</code>
for ex2:
<code>345</code> would <code>return TRUE</code></p>
