php, checking correctnes of text splitting -
i need split html document on 2 parts. first part, should contain n(30) words, , next 1 should contain else. , main problem, prevent splitting tags (description , body of tags).
<a **<=>** href="text" > text </a>
<a href="text" > **<=>** text </a>
<a href="text" > text </ **<=>** a>
give me please suggestions (or if have written such function, please share code), how realize it! thanks.
use dom parser, documentation can find @ http://php.net/manual/en/book.dom.php
you can parse html in tree class, , result tree manipulation , saving data.
Comments
Post a Comment