3
I have a value in mysql database that contains some html commands like:
<b>Olá</b>
<br>
Other...
I need that when I show the value using <?php echo $row_rs['original']; ?>
appear exactly like this in the BD, without the HTML interpretation.
Instead of showing up like this:
Hello
appear like this:
<b>Olá</b>
Thank you.
how do I limit and echo to 35 characters?
– Tiago
@James to limit: echo substr(htmlentities($row_rs['original']), 0, 35);
– George Wurthmann
thanks, thank you very much!
– Tiago
+1 for the correct solution. It is worth mentioning to those who are not familiar with the technologies involved that in fact what is being done is not to avoid interpreting HTML, but to give escape in HTML with more HTML :).
– Bacco