php - How to import an XML feed with UTF-8 characters? -
here example of utf-8 characters in lastfm api xml response:
<artist>psy</artist> <name>강남스타일</name> <album>gangnam style (강남스타일)</album>
i'm using domdocument::load load xml:
$doc->load('http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&[parameters]') foreach ($doc->getelementsbytagname('track') $node) { 'name' => $node->getelementsbytagname('name')->item(0)->nodevalue, etc...
this result:
[artist] => psy [name] => ê°•ë‚¨ìŠ¤íƒ€ì¼ [album] => gangnam style (강남스타ì¼)
what need differently?
Comments
Post a Comment