O'Reilly logo

Core PHP Programming, Third Edition by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20.2. Expat XML

The functions in this section wrap the Expat library developed by James Clark <http://www.jclark.com/xml/>. This library is part of the PHP distribution, and its purpose is parsing XML documents. A stream of data is fed to the parser. As complete parts of the data are recognized, events are triggered. These parts are the tags and the data they surround. You register the events with a handler, a function you write. You may specify FALSE for the name of any handler, and those events will be ignored.

Stig Bakken added the XML extension to PHP.

string utf8_decode(string data)

The utf8_decode function takes UTF-8 text and returns ISO-8859-1 text.

string utf8_encode(string data)

The utf8_encode function returns the data argument as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required