pastebin

strArr
  1. <?php
  2.  
  3. // your code goes here
  4.  
  5. $str='<p>testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count testing word count . . ( 9&amp; &amp; &amp; u87 * * 8 8 8 8 * ( ) &amp; ( &amp; * ^ $ %@ ! !# # ! ! ! ! hello</p><p><img class="" src="https://c...content-available-to-author-only...l.co/w=480,h=480,fit=scale-down/user-images/images/orig/bisi4Bldu1cZwFs3DEebGk4Zksb1oNHy.png"><img class="" src="/w=480,h=480,fit=scale-down/user-images/images/orig/6bJfVHve0wHAk7fX1T8pHWzakbMnsUIA.png"><img class="" src="w=480,h=480,fit=scale-down/user-images/images/orig/WNa2zsVSgnPZZGEysKbPdVXVeOSVB3dF.png"><img class="" src="/w=480,h=480,fit=scale-down/user-images/images/orig/2UTW3RGgWgXakkqmw5dIB6hRJiJwwhAv.png"></p>';
  6.  
  7. $html = str_replace("\xA0", " ", html_entity_decode($str));
  8. // echo $html;
  9. $html = "<html><head></head><body>$html</body></html>";
  10. $strArr = array_filter(array_map("trim", explode(" ", strip_tags($html))));
  11. var_dump($strArr);
  12. // $numWords = sizeof();
  13. // echo $numWords;
  14.  
  15. ?>
Parsed in 0.026 seconds