我有htmlcode如何使用PHP将700 mAh作为数组[0],BL-5CA作为数组[2],诺基亚作为数组[3]。好像这样
preg_match_all('~<span>capacity(.*?)mAh~si', $result, $matches[0]);
preg_match_all('~<span>Model(.*?)</span></div>~si', $result, $matches[1]);
preg_match_all('~<span>Brand(.*?)</span></div>~si', $result, $matches[2]);
它显示了我的空数组。请帮我解决一下
<div class="b-goods-specifications mod_cutted"> <div class="b-goods-specifications-item"> <ul class="b-goods-specifications-list"> <li class = "b-goods-specifications-row g-clearfix "> <div class="b-goods-specifications-cell"> <span> **capacity** </ span> </ div> <div class="b-goods-specifications-cell"> **700 mAh** </ div> </ li> <li class="b-goods-specifications-row g-clearfix"> <div class="b-goods-specifications-cell"> <span> **Model** </ span> </ div > <div class="b-goods-specifications-cell"> **BL-5CA** </ div> </ li> <li class="b-goods-specifications-row g-clearfix"> <div class = "b-goods-specifications-cell "> <span> **Brand** </ span> </ div> <div class="b-goods-specifications-cell"> **Nokia** </ div> </ li> <li class =" b-goods -specifications-row g-clearfix "> <div class="b-goods-specifications-cell"> <span> Type </ span> </ div> <div class="b-goods-specifications-cell"> Li -ion </ div> </ li> </ ul> </ div> </ div>