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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -