Interpret html tags in a php or twig string

0

If I have a string in php / twig that has html tags

<p> hola que tal </p>

How do I load the page to show the content according to the tags instead of printing it as is with the tags?

    
asked by Pavlo B. 02.07.2018 в 16:45
source

1 answer

1

You simply print the example string: code:

<?php
$miString="<li>prueba 1</li>";
$miString2="<p>Esto es un parrafo</p>";
?>
<html>
<?php echo $miString; echo"</br>"; echo $miString2;?>
</html>

result I hope you will be a guide

    
answered by 02.07.2018 в 17:07