Replace string if specific characters found in php
<p>I want to replace the characters if specific characters found.<br>
for example my text having below value :</p>

<pre><code>$text = "@abc hi there!! @jkl,@xyz how are you?";
</code></pre>

<p>Here I want to replace all words which starts with '@' and output should be like  </p>

<pre><code>$text = "&lt;a href='abc'&gt;@abc&lt;/a&gt; hi there!! &lt;a href='jkl&gt;@jkl&lt;/a&gt;,&lt;a href='xyz'&gt;@xyz&lt;/a&gt; how are you?";  
</code></pre>

<p>words may seperate with blank space or comma (with/without space). I want to replace <code>"@abc"</code> with <code>"&lt;a href='abc'&gt;@abc&lt;/a&gt;"</code>.</p>

<p>Thanks in advance</p>
