Check if text exists in variable between tags
<p>Search if text exists between  and  inside $data</p>

<p>All XML data is in $data</p>

<p>I want to search if 7431 exists</p>

<p>XML data looks like this:</p>

<pre><code>&lt;status&gt;
&lt;connection_status&gt;successful&lt;/connection_status&gt;
&lt;operation_status&gt;successful&lt;/operation_status&gt;
&lt;Options&gt;
&lt;data_2&gt;
&lt;data_7422731&gt;
&lt;id&gt;7431&lt;/id&gt;
&lt;assetId&gt;2&lt;/assetId&gt;
&lt;startDate&gt;2013-03-05 11:00:00&lt;/startDate&gt;
&lt;endDate&gt;2013-03-05 12:00:00&lt;/endDate&gt;
&lt;/data_7422731&gt;
&lt;/data_2&gt;
&lt;/Options&gt;
&lt;/status&gt;
</code></pre>

<p>...
result:</p>

<p>echo 'Yes it was found'; // or not</p>

<p>How can I do this?</p>
