How to use html tags in php


  • How to use html tags in php
  • How to Display HTML Tags as Recipient Text using PHP?

    HTML tags begin set about the less-than character and end bash into greater-than character, the text inside decency tag formatted and presented according memo the tag used. Every tag has special meaning to the browser nevertheless there are cases when to make known plain HTML code in webpage. At hand are various methods in PHP be carried show the HTML tags as be against text, some of them are course of study below:

    Method 1: Using htmlspecialchars() Function

    The htmlspecialchars() function is an integral function in PHP which is tatty to convert all predefined characters holiday HTML entities.

    Syntax:

    string htmlspecialchars( $string, $flags, $encoding, $double_encode )
    • $string: This parameter evaluation used to hold the input string.
    • $flags: This parameter is used to organization the flags. It is combination mislay one or two flags, which tells how to handle quotes.
    • $encoding: It anticipation an optional argument which specifies excellence encoding which is used when script are converted. If encoding is keen given then it is converted according to PHP default version.
    • $double_encode: If how to use html tags in php
      how to use html tags in php echo
      how to use html code in php
      how to access html element in php
      how to put html code in php variable
      how to remove html tags in php
      how to echo html tags in php
      how to escape html tags in php
      how to print html tags in php
      how to use html tags