PHP - MySQL data is html code and php doesn't show correctly -
i have values in database column named description contains html code ex. (<p> </p><div class="col-xs-8">..).
i database rows , try show in page, columns displays normal (as plain text) when echo variable contains description value doesn't turn code "page", shows code.
where problem? shouldn't consider code , add page?
code:
<div class="info"> <div class="info-space" style="width: 800px;"></div> <?php echo $pro_desc; ?> </div> </div>
your $pro_desc looks this:
string '<p>&nbsp;</p><div class="col-xs-8"...length(25000) in order display correctly, need convert html format, example <p> <p> , on. try this:
echo "<p>".html_entity_decode($pro_desc)."</p>"; more info: http://php.net/manual/en/function.html-entity-decode.php
Comments
Post a Comment