Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

htmlspecialchars decode function syntax tag tutorial 2013





Alert! Connect with 10,000 Chating Online. Join Now

Php htmlspecialchars decode () function

Write your php code

 
<?php ?>

Php Result


Your code below



(no version information, might be only in CVS)

htmlspecialchars_decode --  Convert special HTML entities back to characters

Syntax

string htmlspecialchars_decode ( string string [, int quote_style] )

This function is the opposite of htmlspecialchars(). It converts special HTML entities back to characters.

The converted entities are: &amp;, &quot; (when ENT_NOQUOTES is not set), &#039; (when ENT_QUOTES is set), &lt; and &gt;.

Parameters

string

The string to decode

quote_style

The quote style. One of the following constants:

Table 1. quote_style constants

Constant NameSyntax
ENT_COMPATWill convert double-quotes and leave single-quotes alone (default)
ENT_QUOTESWill convert both double and single quotes
ENT_NOQUOTESWill leave both double and single quotes unconverted

Return Values

Returns the decoded string.

Examples

Example 1. A htmlspecialchars_decode() example

<?php
$str
= '<p>this -&gt; &quot;</p>';

echo
htmlspecialchars_decode($str);

// note that here the quotes aren't converted
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?>

The above example will output:

<p>this -> "</p>
<p>this -> &quot;</p>

Php htmlspecialchars decode Function syntax tag

htmlspecialchars decode php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php htmlspecialchars decode syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online