使用简单 HTML DOM 组合多个元素


Combine multiple elements with Simple HTML DOM

这是我试图组合的HTML:

<div class="post linkDetail">
  <div class="postThumbnail">
    <a href="/redirect?url=http%3A//blogs.msdn.com/archive/2012/04/23/how-to-improve-performance-in-your-metro-style-app.aspx">
      <img src="<validURL Here>" width="280">
    </a>
  </div>
  <p class="full-url">
    http://blogs.msdn.com/b/windowsappdev/archive/2012/04/03/how-to-improve-performa...
  </p>
  <p></p>
  <p>Nobody likes slow or unresponsive apps. Users expect that apps respond immediately to touch,   taps, clicks, gestures and key-presses. Users expect that animations are smooth, that they can play, pause and restart their music and videos quickly, and that they never have to wait for the app to catch up with them. This is the first in a series of posts on how to make your apps "fast and fluid."    
   </p>
   <p>We invested a lot of time in the engineering teams thinking about how we can ensure the performance of Metro style apps. We have learned what we can do in the platform to deliver on fast and fluid performance and have also learned what works and what does not work in building apps that deliver great experiences. In this blog I share with you some of the hard lessons from our own experiences so that you can build the best possible experiences for your customers.</p><p>Performance is more than just a stopwatch and efficient algorithms. When I think of performance, I like to take a holistic ...
   </p>
</div>

我想获取 p.full-url 元素之后的所有<p>内容,并将所有<p>元素组合成单个文本字符串。

这样:

  <p></p>
  <p>Nobody likes slow or unresponsive apps. Users expect that apps respond immediately to touch,   taps, clicks, gestures and key-presses. Users expect that animations are smooth, that they can play, pause and restart their music and videos quickly, and that they never have to wait for the app to catch up with them. This is the first in a series of posts on how to make your apps "fast and fluid."    
   </p>
   <p>We invested a lot of time in the engineering teams thinking about how we can ensure the performance of Metro style apps. We have learned what we can do in the platform to deliver on fast and fluid performance and have also learned what works and what does not work in building apps that deliver great experiences. In this blog I share with you some of the hard lessons from our own experiences so that you can build the best possible experiences for your customers.</p><p>Performance is more than just a stopwatch and efficient algorithms. When I think of performance, I like to take a holistic ...
   </p>

成为:

没有人喜欢缓慢或无响应的应用程序。 用户希望应用程序立即响应触摸、点击、单击、手势和按键。用户希望动画流畅,他们可以快速播放、暂停和重新启动音乐和视频,并且他们永远不必等待应用程序赶上它们。这是关于如何使您的应用程序"快速流畅"的系列文章中的第一篇。 我们在工程团队中投入了大量时间,思考如何确保 Metro 风格应用的性能。我们已经了解了我们可以在平台中做些什么来提供快速流畅的性能,并且还了解了在构建提供出色体验的应用程序时哪些有效,哪些无效。在这篇博客中,我与您分享了我们自己的经验中的一些惨痛教训,以便您可以为客户构建最佳体验。性能不仅仅是秒表和高效的算法。当我想到性能时,我喜欢采取整体...

这在简单的HTML DOM中可能吗?

我从来没有使用过简单的html dom,但我认为这就是你需要的:

$result = '';
foreach($html->find('p') as $p) {
   $result .= strip_tags($p->plaintext);
}