Tutorial
Func?ia htmlspecialchars_decode() este o func?ie încorporat? a PHP, care transform? entit??ile HTML predefinite în caractere. Este opus func?iei htmlspecialchars(). Entit??ile HTML decodificate înapoi la personaj vor fi:
& converts as & (ampersand)
" converts as " (double-quote)
' converts as ' (single-quote)
< converts as < (less than)
> converts as > (greater than)
Func?ia htmlspecialchars_decode () este utilizat? pentru a decoda entit??ile HTML în caractere, în timp ce htmlspecialchars() este utilizat? pentru a converti caracterul în entit??i HTML.
" converts as " (double-quote)
' converts as ' (single-quote)
< converts as < (less than)
> converts as > (greater than)
Func?ia htmlspecialchars_decode () este utilizat? pentru a decoda entit??ile HTML în caractere, în timp ce htmlspecialchars() este utilizat? pentru a converti caracterul în entit??i HTML.
Exemplul 1:
<?php
$str = "Aceasta este o propozitie cu <b>caractere ingrosat</b>.";
echo htmlspecialchars_decode($str);
?>
Ie?irea HTML a codului de mai sus va fi (View Source):
<!DOCTYPE html>
<html>
<body>
Aceasta este o propozitie cu <b>caractere ingrosate</b>.
</body>
</html>
Exemplu 2:
<?php
$str = "Georgica & 'Videanu'";
echo htmlspecialchars_decode($str, ENT_COMPAT); // Va converti doar ghilimele duble
echo "<br>";
echo htmlspecialchars_decode($str, ENT_QUOTES); // Converte?te ghilimele duble ?i simple
echo "<br>";
echo htmlspecialchars_decode($str, ENT_NOQUOTES); // Nu converte?te nicio ofert?
?>
Online Editor
This tool makes it easy to create, adjust, and experiment with custom colors for the web.
HTML Templates

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.
CSS HTML Layout

Find here examples of creative and unique website layouts.
Free CSS HTML Menu

Find here examples of creative and unique website CSS HTML menu.