note 88741 modified in function.str-word-count by danbrown

From: Date: Thu, 05 Feb 2009 17:04:10 +0000
Subject: note 88741 modified in function.str-word-count by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150266@lists.php.net to get a copy of this message
We can also specify a range of values for charlist. <?php $str = "Hello fri3nd, you're looking good today! look1234ing"; print_r(str_word_count($str, 1, '0..3')); ?> will give the result as Array ( [0] => Hello [1] => fri3nd [2] => you're [3] => looking [4] => good [5] => today [6] => look123 [7] => ing ) --was-- We can also specify a range of values for charlist. $str = "Hello fri3nd, you're looking good today! look1234ing"; print_r(str_word_count($str, 1, '0..3')); will give the result as Array ( [0] => Hello [1] => fri3nd [2] => you're [3] => looking [4] => good [5] => today [6] => look123 [7] => ing ) http://php.net/manual/en/function.str-word-count.php

« previous php.notes (#150266) next »