title: Appending a html tag to php variable
body: <p>I am newbie to php, just starting learning it, while working with wordpress.</p>
  
  <p>I want to add html code to a php variable, a anchor tag link actually. First i splitted the text using <code>substr()</code>, and now i want to append a anchor tag at the end of post.</p>
  
  <pre><code>$json['timeline']['date'][$i]['text'] =  substr(strip_tags($post-&gt;post_content), 0, 400)+"&lt;a href='#'&gt;Read more..&lt;/";
  </code></pre>
  
  <p>Well, I believe this is not the right way. Can anyone please guide me?</p>