How to display HTML code as HTML code using PHP

sea*_*aly 3 php

I have the PHP code as below:

<?php
  echo "<tr></tr>";
  //ouput I want : <tr></tr>
?>
Run Code Online (Sandbox Code Playgroud)

当输出我想要显示<tr></tr>.但我不知道我应该使用的whitch功能,任何人都知道请帮帮我,谢谢

Gau*_*164 6

试试htmlentities喜欢

<?php
  echo htmlentities("<tr></tr>");
?>
Run Code Online (Sandbox Code Playgroud)

关注此链接