Re: Xpath arguments in variable
| From: | Gary | Date: | Wed, 15 Sep 2010 08:04:11 +0000 |
| Subject: | Re: Xpath arguments in variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-308087@lists.php.net to get a copy of this message | ||
Sridhar Pandurangiah wrote:
> 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.
Whats wrong with
$v = $row->xpath('//membernumber[. = ' . $MemberId . ']');
?
Am I not understanding what you are trying to ask?
--
Gary Please do NOT send me 'courtesy' replies off-list.
PHP 5.2.12 (cli) (built: Jan 14 2010 14:54:11)
1.7.7(0.230/5/3) 2010-08-31 09:58 Cygwin