Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

PHP html_entity_decode() Function

by
Category:php
php php string
PHP html_entity_decode() Function

The html_entity_decode() function is used to convert all HTML entities to their applicable characters. The html_entity_decode() function is the opposite of htmlentities(). You may also like PHP htmlspecialchars_decode() Function and How to Encode and Decode URL Using PHP.

Example

<?php
$str = '&lt;a href=&quot;https://www.w3schools.com&quot;&gt;w3schools.com&lt;/a&gt;';
echo html_entity_decode($str);
?>

Output

<a href="https://www.w3schools.com">Go to w3schools.com</a> 

0 Comments


Html code work in comment box


Related Post