How to check the sub string is exists or not in main string
<p>Is there any way to check the sub string is exists in main string or not. If exits, no need any another action. If not exists, I want to add some another string to main string. </p>

<p>For an example:</p>

<pre><code>$a = 'Hello world';
$b = 'Hello';
</code></pre>

<p>I want to check the <code>$b</code> is exists in <code>$a</code> or not. If exists, i am sending that variable to database. If not exists, I want to use <code>str_replace('Hello', $b.'World', $b)</code>.</p>
