Return Longest Paragraph

Discussion in 'PHP' started by FishSword, May 25, 2011.

  1. #1
    Hiya! ;)

    I have a file (see attached) that contains basic HTML for a page with multiple paragraphs.
    How do I check the length of each paragraph to find out if it is 30 characters or over?

    If the first paragraph is not equal to 30 characters, then it should move on to the next one, and so on.

    If a paragraph is found to be the correct length, I then need to extract the text from the <p> tags.
    If a none of the paragraph match 30 characters in length, then the code will need to choose the best length paragraph.

    Any help is greatly appreciated.

    Many Thanks,

    FishSword
     
    FishSword, May 25, 2011 IP