: This article mainly introduces php two-layer filtering to get the content of the message. if you are interested in the PHP Tutorial, please refer to it.
// Two-layer filter, get the message content $ str ='Test text 1
The owner's message:
Test Text 2 ..
'; // $ Str ='Amazing
'; // Preg_match ("/[^. *] (style = \ "font-size: 14px; line-height: 150%; padding: 10px; \"> )(. *) <\/p>. * $/", $ str, $ str_arr );
Preg_match ("/[^. *] id = \ "read _ [0-9] {8} \" (style = \ "font-size: 14px; line-height: 150%; padding: 10px; \ "> )(. *) <\/p>. * $/", $ str, $ str_arr); // you can fix the issue of filtering out comments from the poster. // print_r ($ str_arr ); if ($ str_arr [1] = "style = \" font-size: 14px; line-height: 150%; padding: 10px; \ ">") {echo "find! ";//
The above section introduces two-layer php filter to get the content of the message, including the content, and hope to help friends who are interested in the PHP Tutorial.