note 91588 added to function.substr-count

From: Date: Thu, 18 Jun 2009 08:37:48 +0000
Subject: note 91588 added to function.substr-count
Groups: php.notes 
Request: Send a blank email to php-notes+get-157050@lists.php.net to get a copy of this message
It was suggested to use substr_count ( implode( $haystackArray ), $needle ); instead of the function described previously, however this has one flaw. For example this array: array ( 0 => "mystringth", 1 => "atislong" ); If you are counting "that", the implode version will return 1, but the function previously described will return 0. ---- Server IP: 117.55.229.1 Probable Submitter: 59.167.198.201 ---- Manual Page -- http://www.php.net/manual/en/function.substr-count.php Edit -- https://master.php.net/note/edit/91588 Del: integrated -- https://master.php.net/note/delete/91588/integrated Del: useless -- https://master.php.net/note/delete/91588/useless Del: bad code -- https://master.php.net/note/delete/91588/bad+code Del: spam -- https://master.php.net/note/delete/91588/spam Del: non-english -- https://master.php.net/note/delete/91588/non-english Del: in docs -- https://master.php.net/note/delete/91588/in+docs Del: other reasons-- https://master.php.net/note/delete/91588 Reject -- https://master.php.net/note/reject/91588 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#157050) next »