Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display HTML code as HTML code using PHP [closed]

Tags:

php

I have the PHP code as below:

<?php
  echo "<tr></tr>";
  //ouput I want : <tr></tr>
?>

When Output I want to display <tr></tr>.But I don know whitch function that I should use for this,anyone know help me please,thanks

like image 609
sealong Maly Avatar asked Dec 26 '22 18:12

sealong Maly


2 Answers

Try with htmlentities like

<?php
  echo htmlentities("<tr></tr>");
?>

Follow this LINK

like image 82
Gautam3164 Avatar answered Dec 28 '22 22:12

Gautam3164


You can also make use of htmlentities()

<?php
  echo htmlentities("<tr></tr>");
?>
like image 24
Shankar Narayana Damodaran Avatar answered Dec 28 '22 23:12

Shankar Narayana Damodaran