1. Go to this page and download the library: Download gavinggordon/htmlentities library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gavinggordon / htmlentities example snippets
$htmlentities = new \GGG\HtmlEntities();
$to_encode = 'Test-,;:';
// Set a variable containing a string of the encoded characters you wish to be encoded;
$encoded = $htmlentities->encode( $to_encode );
// Get the encoded result by using the encode method on the returned instance of HtmlEntities;
echo $encoded;
// Display the encoded result, which is of type String;
// Test&hyphen;&comma;&semi;&colon;
$to_decode = 'Test&tilde;&ast;&lpar;&num;';
// Set a variable containing a string of the encoded characters you wish to be decoded;
$decoded = $htmlentities->decode( $to_decode );
// Get the decoded result by using the decode method on the returned instance of HtmlEntities;
echo $decoded;
// Display the decoded result, which is of type String;
// Test~*(#
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.