Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用子项()从外部HTML获取_Php_Html_Dom_Children - Fatal编程技术网

Php 使用子项()从外部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,

我试图从外部站点的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, 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];