note 66450 added to function.substr-count

From: Date: Tue, 23 May 2006 02:37:19 +0000
Subject: note 66450 added to function.substr-count
Groups: php.notes 
Request: Send a blank email to php-notes+get-111845@lists.php.net to get a copy of this message
Any functions of case-insensitive substr_count? Which is very handy when you look up the occurences of particular word in the text, because the first letter or even whole word might be capitalised. Or just implement by something like <?php $text = 'This is a test'; echo substr_count($text, 'is')+substr_count($text, ucwords('is'))+substr_count($text,strtoupper('is')); ?> ---- Server IP: 66.163.161.117 Probable Submitter: 218.178.156.64 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.substr-count.php Edit -- http://master.php.net/note/edit/66450 Del: integrated -- http://master.php.net/note/delete/66450/integrated Del: useless -- http://master.php.net/note/delete/66450/useless Del: bad code -- http://master.php.net/note/delete/66450/bad+code Del: spam -- http://master.php.net/note/delete/66450/spam Del: non-english -- http://master.php.net/note/delete/66450/non-english Del: in docs -- http://master.php.net/note/delete/66450/in+docs Del: other reasons-- http://master.php.net/note/delete/66450 Reject -- http://master.php.net/note/reject/66450 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111845) next »