Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15895
| From | albert <alstopspam@stopaspam.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | count chars but not using count_chars |
| Date | 2015-11-14 11:42 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <n2736a$vt0$3@speranza.aioe.org> (permalink) |
If have "Hello World World"
how can count the spaces number?
I founded this
$str = "Hello World World";
$strArray = count_chars($str,1);
but is necessary to create more code for to have the value
foreach ($strArray as $key=>$value)
{echo "The character ".chr($key)."was found $value time";}
and filter the $key
there isn't a directly function?
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
count chars but not using count_chars albert <alstopspam@stopaspam.com> - 2015-11-14 11:42 +0100
Re: count chars but not using count_chars Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-14 12:51 +0100
Re: count chars but not using count_chars Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-14 09:09 -0500
Re: count chars but not using count_chars Matthew Carter <m@ahungry.com> - 2015-11-14 23:08 -0500
Re: count chars but not using count_chars Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-17 21:35 +0100
csiph-web