title: How to add quotes around each word in a string from simplehtmldom
body: <p>I am trying to grab the contents of specific tags by class from a web page, turn to plain text, and wrap each word with double quotes.</p>
  
  <pre><code>include_once('simple_html_dom.php');
  
  $html = file_get_html('http://linktosite.com');
  foreach ( $html-&gt;find('.table tr td.span8') as $element ) {
      echo $element-&gt;plaintext . '&lt;br&gt;';
  }
  </code></pre>
  
  <p>This outputs the text inside each table->tr->td.span8 onto new lines.</p>
  
  <p>I would like to take the text from each instance, and wrap each individual word in quotes and separate by commas like this:</p>
  
  <p>from:</p>
  
  <blockquote>
    <p>wrap each word with quotes and separate with comma</p>
  </blockquote>
  
  <p>to:</p>
  
  <blockquote>
    <p>"wrap", "each", "word", "with", "quotes", "and", "separate", "with", "comma"</p>
  </blockquote>
  
  <p>I would also like to take it a step further, and only include specific words that I specify in the output.  I will be getting text from a page with about 200 entries, and I want $element->plaintext to only show the words in a variable I set.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks</p>