Jump to content

count total <br> in textarea


robert_gsfame

Recommended Posts

It's easy to count string length in textarea as we can use strlen

 

 

$message=$_POST['message'];

$length=strlen($message); ---------> to count total string

 

But if i want to count total <br> in textarea, can i do that??

 

$message1=$_POST['message'];

$count=substr_count($message1,'<br>')

i dont think it would be correct

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/183673-count-total-in-textarea/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.