oportell wrote:
I'm not familiar with Zend_Dom, but are you sure the returned object is an array, or is Countable? You might just get an object, which does contain multiple items, but count returns 1 for it. You shouldn't use count() for debugging purposes just for this reason. Use gettype() / get_class() in stead, and introspect the returned object based on it's type, or use var_export / var_dump to debug.$xmlfile = BASE_PATH . '/language/all_languages.tmx'; if (file_exists($xmlfile)) { $xml = file_get_contents($xmlfile); $dom = new Zend_Dom_Query(); $dom->setDocumentXml($xml); $xpath = "//t...@xml:lang='en']"; $results = $dom->queryXPath($xpath); $rows = count($results); }But $rows always gets a value of 1. Why is that?
This might not be the case though, just be aware of the possibility :-) drm / Gerard
