Funzione htmlspecialchars_decode

La funzione htmlspecialchars_decode esegue un'operazione inversa alla funzione htmlspecialchars.

Sintassi

phphtmlspecialchars_decode(string $string, int $flags = ENT_COMPAT): string

Esempio

Convertiamo una stringa con dei tag:

php<?php
  $str = '<b>text</b>';
  $res = htmlspecialchars_decode($str);
  
  echo $res;
?>

Risultato dell'esecuzione del codice:

php'<b>text</b>'

Vedi anche