Php 使用子项()从外部HTML获取
我试图从外部站点的html源代码中获取行Php 使用子项()从外部HTML获取,php,html,dom,children,Php,Html,Dom,Children,我试图从外部站点的html源代码中获取行v4.0,其中A2DP是在Yes、和、之后创建的。 在其他情况下,带有A2DP的v4.0可以有其他值,但它总是介于Yes、和, 这是html的外部源: <tr> <td class="ttl"><a href="glossary.php3?term=wi-fi">WLAN</a></td> <td class="nfo">Wi-Fi 802.11 a/b/g/n, dual-band,
v4.0,其中A2DP
是在Yes、
和、
之后创建的。
在其他情况下,带有A2DP的v4.0可以有其他值,但它总是介于Yes、
和,
这是html的外部源:
<tr>
<td class="ttl"><a href="glossary.php3?term=wi-fi">WLAN</a></td>
<td class="nfo">Wi-Fi 802.11 a/b/g/n, dual-band, DLNA, Wi-Fi Direct, Wi-Fi hotspot</td>
</tr>
<tr>
<td class="ttl"><a href="glossary.php3?term=bluetooth">Bluetooth</a></td>
<td class="nfo">Yes, v4.0 with A2DP, LE, EDR</td>
</tr>
<tr>
<td class="ttl"><a href="glossary.php3?term=nfc">NFC</a></td>
<td class="nfo">Yes</td>
</tr>
尝试如下更改代码:
$plain = explode(',', $node->children(1)->plaintext);
echo $plain[1];
Yes, v4.0 with A2DP, LE, EDR
$plain = explode(',', $node->children(1)->plaintext);
echo $plain[1];