Xpath arguments in variable

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

 



Hi

I have the following statement that locates the node "membernumber" with the value A192. This works perfectly fine.

$v = $row->xpath('//membernumber[. = "A192"]');

But now I need to pass this value to XPath within a string variable say

$v = $row->xpath('//membernumber[. = $MemberId]');

But this doesnt work due to the quotes. What I intend PHP to do is to substitute the value for $MemberId and then execute the XPath query. I have grappled with it for a few days before posting this. Any ideas are most welcome

Best regards

Sridhar

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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