Jump to content

Right-to-Left languages, XML, and php


theonemule

Recommended Posts

I'm working in php5, trying to extract right-to-left text from a node in an XML file.

 

I load the file, then cycle the nodes using this:

 

	foreach($result as $content)
{
	$uStr = $content->nodeValue;
	echo strlen($uStr)."<br/>";	
}

 

The  strlen($uStr) returns 0 on every node, and I tried to echo the nodeValue, but it did not display anything.  ???

 

Here is a sample of the XML:

 

<item>ئالەمنىڭ يارىتىلىشى (1-، 2-بابلار)</item>

<item>گۇناھنىڭ پەيدا بولۇشى (3-باب)</item>

<item>ئادەم ئاتىنىڭ ئەۋلادلىرى (4-، 5-بابلار)</item>

<item>توپان بالاسى ۋە نۇھ پەيغەمبەر (6 - 10-بابلار)</item>

<item>تىلنىڭ قالايمىقانلاشتۇرۇۋېتىلىشى (11-باب 1 - 9-ئايەتلەر)</item>

<item>ئىبراھىمنىڭ چاقىرىلىشى ۋە ئۇنىڭ ھاياتى (11-باب 10-ئايەتتىن 25-باب 11-ئايەتكىچە)</item>

<item>ئىبراھىمنىڭ ئەۋلادلىرى (25-باب 12-ئايەتتىن 45-بابقىچە)</item>

 

Any thoughts?

 

 

Link to comment
https://forums.phpfreaks.com/topic/146205-right-to-left-languages-xml-and-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.