robert_gsfame Posted December 2, 2009 Share Posted December 2, 2009 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 More sharing options...
robert_gsfame Posted December 2, 2009 Author Share Posted December 2, 2009 sorry should be $count=substr_count($message1,"\n"); ;D ;D Link to comment https://forums.phpfreaks.com/topic/183673-count-total-in-textarea/#findComment-969462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.