Php Echo Html Code - Php

How to echo html code in php?

Snippet Code


  
Rate this page :
  [ 0 votes]

You can give html tags inside double quotes to display "html codes" using echo statement in php.

<?php $str="<html><head><title>PHP display html code</title></head><body><h1>PHP echo html code</h1></body></html>"; echo $str; ?>

Tags


Ask Questions

Ask Question