title: How To Wrap String in PHP with html tag
body: <p>this is my first questions in stack overflow.
  i want build search result in php.
  i have code like below:</p>
  <pre><code>&lt;?php
  $kw = $_GET['keyword'];
  // database process store in $data
  // then echo result
  foreach ($data as $d){
          $title = get_the_title($d);
  
          echo str_replace($kw , &quot;&lt;span class='highlight-text'&gt;&quot;.$kw.&quot;&lt;/span&gt;&quot;, $title).&quot;&lt;br/&gt;&quot;;
      }
  ?&gt;
  </code></pre>
  <p>but why i cant get the result with it?</p>
  <p>thank you</p>