Split file with PHP and generate contents

Posted by user201140 on Stack Overflow See other posts from Stack Overflow or by user201140
Published on 2010-05-09T19:47:25Z Indexed on 2010/05/09 19:58 UTC
Read the original article Hit count: 184

Filed under:
|
|
|

How do I split the content below into separate files without the placeholder tags. I'd also like to take the text inside the placeholder tags and place them inside a new contents file.

<div class='placeholder'>The First Chapter</div>

This is some text.

<div class='placeholder'>The Second Chapter</div>

This is some more text.

<div class='placeholder'>Last Chapter</div>

The last chapter.

Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about file-io