List Info

Thread: note 74213 added to function.count-chars




note 74213 added to function.count-chars
user name
2007-03-30 01:54:27
this code can find each characters count

<?php
$enter = 0;
$data = strtolower ($inputString);
foreach (count_chars ($data, 1) as $i => $val) 
	{
		if ($enter == 1)
		{
			$enter = 0;
			continue;
		}
		if (chr ($i) == "n")
		{
			echo "There are $val instance(s) of " Enter
" in the string.n";
			$enter = 1;
		}
		else
		{
			echo "There are $val instance(s) of "" ,
chr ($i) , "" in the string.n";
		}
	}
?>
----
Server IP: 203.199.114.50
Probable Submitter: 61.11.124.58
----
Manual Page -- http://www.php.net/manual/en/function.count-chars.php
Edit        -- https://master
.php.net/note/edit/74213
Del: integrated  -- h
ttps://master.php.net/note/delete/74213/integrated
Del: useless     -- http
s://master.php.net/note/delete/74213/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/74213/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/74213/spam
Del: non-english -- 
https://master.php.net/note/delete/74213/non-english
Del: in docs     -- http
s://master.php.net/note/delete/74213/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/74213
Reject      -- https://mast
er.php.net/note/reject/74213
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )