WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/ent2ncr

Description

Converts named entities into numbered entities.

Usage

<?php ent2ncr$text ?>

Parameters

$text
(string) (required) The text within which entities will be converted.
Default: None

Return Values

(string) 
Text with converted entities.

Examples

<?php
echo ent2ncr("C&rsquo;est la f&ecirc;te!");
// this will output: C&#8217;est la f&#234;te!
?>

And you will see:

C'est la fête!

Notes

Change Log

Since: 1.5.1

Source File

ent2ncr() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.