php - Removing portion from scraped array -


currently scraping website , trying remove portion of code don't want included in array.

so code have

$content['article'] = $html2->find('.hentry-content',0); $content['article'] = $content['article']->plaintext; 

this returns within .hentry-content class on website gathering content from.

now content gets returned looks this.

array ( [article] => example filler content please no actual meaning behind random bridge bridge random dog tomorrow http://example.com/our-random-mp3.com ) 

now @ end of output includes random mp3 there anyway can pull content portion of array without mp3 being included?

if link inside of <a> tag should work

foreach($content['article']->find('a') $item) {     $item->outertext = ''; }  echo $content['article']->plaintext; 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -