是否可以比较多次使用的元素的值?

时间:2017-04-20 15:06:27

标签: xpath

我想在多次列出的元素$dictionary="stdClass Object ( [status] => 0 [environment] => Sandbox [receipt] => stdClass Object ( [quantity] => 1 [expires_date] => 2017-04-18 08:56:57 Etc/GMT [is_trial_period] => false [purchase_date] => 2017-04-18 08:51:57 Etc/GMT [product_id] => com.1monthAuto.baseball [original_purchase_date_pst] => 2017-04-18 01:51:58 America/Los_Angeles [original_purchase_date_ms] => 1492505518000 [web_order_line_item_id] => 1000000034854560 original_purchase_date] => 2017-04-18 08:51:58 Etc/GMT ) [latest_receipt] => MIIT6wYJKoZIhvcNAQcCoIIT3DCCE9gC )"; preg_match('/.*\[latest_receipt\].*$/m', $dictionary, $matches); $receipt = str_replace('[latest_receipt] => ', '', $matches[0]); echo $receipt; 中取一个值,并将其与之前的JobNumberString进行比较,看它是否高出1位数?这可能吗?
实施例:

JobNumberString

给出错误,因为这不比之前的值高1。

0 个答案:

没有答案