I would like to extract the first two paragraphs of a content from a database, the code i got it from somewhere works fine only to extract one (first) paragraph in the content...
Code: Select all
<?php echo substr($row_feeds['pg_content'], 0, strpos($row_feeds['pg_content'], "</p>"));?>Let's say this is my content from the database,
Code: Select all
<p>xxxxx</p>
<p>xxxxx</p>
<p>xxxxx</p>Lau