Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/260.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 dom获取表中的数据_Php_Php 5.3_Simple Html Dom_Domparser - Fatal编程技术网

Php 简单的html dom获取表中的数据

Php 简单的html dom获取表中的数据,php,php-5.3,simple-html-dom,domparser,Php,Php 5.3,Simple Html Dom,Domparser,我试图从一个站点获取产品名称,但我很难理解如何访问表并解析元素 到目前为止,我有这个 $html = $this->file_get_html('http://www.fastfurnishings.com/sofa-bed-couch-sleeper-lounger-futon-fabric-leather-sofas-s/50.htm'); $x = $html->find('table',6); var_dumpof$x给了我很多对象和数组,我没有达到我需要的位置,也就是从

我试图从一个站点获取产品名称,但我很难理解如何访问表并解析元素 到目前为止,我有这个

$html = $this->file_get_html('http://www.fastfurnishings.com/sofa-bed-couch-sleeper-lounger-futon-fabric-leather-sofas-s/50.htm');
 $x = $html->find('table',6);
var_dump
of
$x
给了我很多对象和数组,我没有达到我需要的位置,也就是从表中获取产品名称。任何帮助都将不胜感激
谢谢

如果该网站有一个提要或API可以用来检索该信息,你不觉得这样更好吗?是的,已经尝试过了,但他们没有提要或API:(