title: PHP Parse content from url
body: <p>i need some help regarding this study script im building which im trying to fetch articles from a website.</p>
  
  <p>Currently im able to get the article from 1 element but failing to get all elements, this is an example of the url im trying to fetch</p>
  
  <pre><code>&lt;div class="entry-content"&gt;
  &lt;/div&gt;
  
  &lt;div class="entry-content"&gt;
  &lt;/div&gt;
  
  &lt;div class="entry-content"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my PHP code to get the content of the first div :</p>
  
  <pre><code>function getArticle($url){
  
      $content = file_get_contents($url);
      $first_step = explode( '&lt;div class="entry-content"&gt;' , $content );
      $separate_news = explode("&lt;/div&gt;" , $first_step[1] );
      $article = $separate_news[0];
  
      echo $article;
  
  }
  </code></pre>