PHP Tutorial
PHP htmlspecialchars() function, run and write PHP code.
PHP htmlspecialchars() function - online editor.
Convert special characters to HTML entities.
The PHP htmlspecialchars() function is used to convert 5 characters into corresponding HTML entities. " (double quote), & (ampersand), ' (single quote), > (greater than), < (less than)) to HTML entities (' (single quote) becomes ', & (ampersand) becomes &, > (greater than) becomes > < (less than) becomes < ).
Syntax:
htmlspecialchars(string,flags,character-set,double_encode);
Tags: The PHP htmlspecialchars() function is used to convert 5 characters into corresponding HTML entities. " (double quote), & (ampersand), ' (single quote), > (greater than), < (less than)) to HTML entities (' (single quote) becomes ', & (ampersand) becomes &, > (greater than) becomes > < (less than) becomes < ).
Syntax:
htmlspecialchars(string,flags,character-set,double_encode);
Example :
htmlspecialchars () function Convert special characters to HTML entities
htmlspecialchars () function Convert special characters to HTML entities
<?php
echo "<a href='https://www.agernic.com/'>Tutorial PHP</a> Have a nice day!";
echo "<br>";
$e_new = htmlspecialchars("<a href='https://www.agernic.com/'>
Tutorial PHP</a> Have a nice day!", ENT_QUOTES);
echo $e_new;
?>
PHP htmlspecialchars() function 12
PHP htmlspecialchars() function
PHP Functons
PHP count() FunctionPHP define() function
PHP empty() Function
PHP explode() function
PHP html_entity_decode() function
PHP htmlentities() function
PHP htmlspecialchars_decode() function
PHP htmlspecialchars() function
PHP implode() function
PHP isset() Function
PHP lcfirst() function
PHP ltrim() function
PHP md5() function
PHP print() function
PHP printf() function
PHP rtrim() function
PHP similar_text() function
PHP str_repeat() function
PHP str_replace() function
PHP str_split() function
PHP strcmp() function
PHP strip_tags() function
PHP strlen online function
PHP strrchr() Function
PHP strstr() function
PHP strtolower() function
PHP strtoupper() function
PHP substr() function
PHP trim() function
PHP ucfirst() function