$String = "<H2>This is a header</H2>
<P>This is sample text. This is sample text. This is sample text. This is sample text. </P>
<P>This is even more sample text. This is even more sample text. Sample text is cool!</P>"
I'd like a small script to output the first 100 characters of the content of the first <P></P> tags. Can this be done? If so, please can someone post some example code?
Question
AshMan
I have a string that looks like this:
I'd like a small script to output the first 100 characters of the content of the first <P></P> tags. Can this be done? If so, please can someone post some example code?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts