title: PHP: How to get only text from variable?
body: <p>how can i get only text data from the table? Without any links and images?</p>
  
  <pre><code>    while ($row = $most_rep-&gt;fetch_assoc()) {
      $post_title = $row['post_title'];
      $post_content = mb_substr($row['post_content'],0,120);
      $guid = $row['guid'];
      $post_date = $row['post_date'];
      echo 
      "&lt;a href='$guid' target='_blank'&gt;"
      ."&lt;div class='post_title'&gt;$post_title&lt;/div&gt;"."&lt;/a&gt;"
      ."&lt;a href='$guid' target='_blank'&gt;"
      ."&lt;div class='post_description'&gt;$post_content&lt;/div&gt;"
      ."&lt;div class='post_date'&gt;$post_date&lt;/div&gt;"
      ."&lt;/a&gt;";
  }
  </code></pre>
  
  <p>Inside variable $post_content i have text and images and links from the post. I would like to echo only text.</p>
  
  <p>Appreciate any help</p>