title: How to add hyperlink to a word which is a part of a string in PHP?
body: <p>I've one string and a link, as follows :</p>
  
  <pre><code>$link = 'https://www.google.co.in';
  $str = 'Hi all welcome to the google page Google Page';
  </code></pre>
  
  <p>Now I want to make the word <strong>'Google Page'</strong> a hyper link. When the whole string($str) will appear on a web page the string <strong>'Google Page'</strong> should appear as a hyperlink and upon click on it the link <code>'https://www.google.co.in'</code> should get open.</p>
  
  <p>For achieving this I tried following code but no success.</p>
  
  <pre><code>Phpfox::getUserBy('full_name').' accepted your request to join'.&lt;a href=$sLink&gt;Google Page&lt;/a&gt;Group Name
  echo 'Hi all welcome to the google page &lt;a href=$link&gt; '.Google Page'.'&lt;/a&gt;'';
  </code></pre>
  
  <p>Can someone please help me and correct the mistake I'm  making in my code?</p>
  
  <p>Thanks.</p>