note 39251 added to function.substr-count

From: Date: Thu, 22 Jan 2004 01:50:27 +0000
Subject: note 39251 added to function.substr-count
Groups: php.notes 
Request: Send a blank email to php-notes+get-63994@lists.php.net to get a copy of this message
This function is useful to find out the number of new line characters are used in a string - for example, before using nl2br() or <pre>. It can also be used for paging text by the number of new lines created by wordwrap($text,75) function str_lines($str) { return substr_count($str,"\n"); } ---- Manual Page -- http://www.php.net/manual/en/function.substr-count.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39251 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39251&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39251&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63994) next »