nggit / php-xmlentities
Convert all Unicode characters and character references to numeric character references
dev-master
2019-03-05 04:48 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-05-05 18:33:21 UTC
README
Tip: Rename this md
file to php
to test it on your web server.
<?php
require 'src/NCR.php';
$str = '<p> © © with ❤ </p>';
$encoded = Nggit\PHPXMLEntities\NCR::encode($str);
These are portable ASCII characters
echo $encoded;
// Source view:
// <p> © © with ❤ </p>
exit;
?>
That's it! This library doesn't use the mbstring
or iconv
extension for better compatibility.