note 66450 deleted from function.substr-count by bjori

From: Date: Tue, 23 May 2006 13:45:32 +0000
Subject: note 66450 deleted from function.substr-count by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-111876@lists.php.net to get a copy of this message
Note Submitter: Reason: bad code ---- 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')); ?>

« previous php.notes (#111876) next »