【发布时间】:2013-02-14 12:37:47
【问题描述】:
HTML结构:
<div id="product">
<p>some text</p>
<p>some text2</p>
</div>
我的 PHP 代码:
$client = new Client();
$crawler = $client->request('GET', $url);
echo $crawler->filter('#product')->text();
返回:
some text some text2
但我需要:
<p>some text</p>
<p>some text2</p>
【问题讨论】: