SF23103 Posted March 12, 2014 Share Posted March 12, 2014 I'm stuck. Any ideas on the easiest way to count specific php tags in a MySQL row? I want to count the number of <p> tags in a particular MySQL row, in order to determine which DIV to use. Link to comment https://forums.phpfreaks.com/topic/286898-count-html-tags-in-mysql-row/ Share on other sites More sharing options...
trq Posted March 12, 2014 Share Posted March 12, 2014 substr_count. Link to comment https://forums.phpfreaks.com/topic/286898-count-html-tags-in-mysql-row/#findComment-1472253 Share on other sites More sharing options...
SF23103 Posted March 12, 2014 Author Share Posted March 12, 2014 You got it! Thanks!! $paragraph_count = substr_count($sql_row_text, '<P>'); Link to comment https://forums.phpfreaks.com/topic/286898-count-html-tags-in-mysql-row/#findComment-1472257 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.