Share

PHP Simple HTML DOM Parser

Subscribe

Get the text inside a div

You are viewing a single message from this topic. View all messages.

  1. 2009-10-19 23:29:51 UTC

    Hello,

    See below

     <!-- lack of a quote in first line -->
    <div id='test>
    <div class='class1'>word1...</div>   
    <div class='class2'>word2...</div> 
     The text I want to get
    <div class='class3'>word3...</div> 
    </div>
    

    $html=strgethtml('<html><your sample> </html>'); echo $html->plaintext

    shows [The text I want to get]

    I hope I have not made a slip scriptum.

    Good luck

< Previous | 1 | Next >

Add a Reply

You can use Markdown syntax in your reply.

Preview

Monitor this

Log in to monitor this topic. Not registered? Create an account to receive email updates when replies are posted to this topic. If you do not log in or register, your reply will be added anonymously.