title: Extract paragraphs from Wikipedia API using PHP cURL
body: <p>Here's what I'm trying to do using the Wikipedia (MediaWiki) API - <a href="http://en.wikipedia.org/w/api.php" rel="nofollow noreferrer">http://en.wikipedia.org/w/api.php</a></p>
  
  <ol>
  <li><p>Do a GET on <a href="http://en.wikipedia.org/w/api.php?format=xml&amp;action=opensearch&amp;search=[keyword]" rel="nofollow noreferrer">http://en.wikipedia.org/w/api.php?format=xml&amp;action=opensearch&amp;search=[keyword]</a> to retrieve a list of suggested pages for the keyword</p></li>
  <li><p>Loop through each suggested page using a GET on <a href="http://en.wikipedia.org/w/api.php?format=json&amp;action=query&amp;export&amp;titles=[page" rel="nofollow noreferrer">http://en.wikipedia.org/w/api.php?format=json&amp;action=query&amp;export&amp;titles=[page</a> title]</p></li>
  <li><p>Extract any paragraphs found on the page into an array</p></li>
  <li><p>Do <em>something</em> with the array</p></li>
  </ol>
  
  <p>I'm stuck on #3.  I can see a bunch of JSON data that includes "\n\n" between paragraphs, but for some reason the PHP explode() function doesn't work.</p>
  
  <p>Essentially I just want to grab the "meat" of each Wikipedia page (not titles or any formatting, just the content) and break it by paragraph into an array.</p>
  
  <p>Any ideas?  Thanks!</p>