WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/ent2ncr

Contents

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.