Re: Convert all named entities into numeric character references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/03/06, Jacob Friis Saxberg <webcom.dk@xxxxxxxxx> wrote:> > > Does anyone know of a Php funtion that can do this:> > > http://golem.ph.utexas.edu/~distler/blog/NumericEntities.html> > Hi there!> >> > http://se.php.net/manual/en/function.htmlentities.php> >> > ?>> htmlentities converts to named entitites. I want it to numeric entities.
This is probably the simplest way of doing it; write a simple functionthat translates entity names to numbers, then start an output bufferat the beginning of your script using the function as an outputcallback function. Then everything after that automatically getsconverted.
In fact it's so simple, I'll do it for you...
Code posted to pastebin:
   http://robinv.pastebin.com/592400
  -robin

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux