Paging inside a content
Consider an article inside a div that has many <p>
tag. Is there any serverside 开发者_运维百科way -( php, mysql) to paging <p>
inside div?
<div id="page">
<p>lipsum</p>
<p>lipsum</p>
<p>lipsum</p>
<p>lipsum</p>
</div>
EDIT: I can search in google for php pagination and I have read some o them. I want to paginate specific tags inside one filed not fetch specific rows. There isnt any get query. This is only a dynamic article that fetched from a field.
Thanks in advance
If you want to paginate content inside single article and article is stored in single row in database. You will have to do it in php.
retrieve content of article from database
explode content into parts, I do this on one of my sites by inserting
<!-- BRAKE -->
inside content where I want brake to happed when writing article before storing it in databaseMake the usual pagination logic for displaying certain article part
Second step is trick, if you want to break it on p I suggest using some DOM parser to do it.
精彩评论