login  Naam:   Wachtwoord: 
Registreer je!
 Overzicht:
Overzicht > PHP > Strings > substr_count()

Gebruik:
int substr_count ( string string, string substring)

Uitleg:
Geeft het aantal keren dat een substring voorkomt in een string.


Voorbeeld:
We willen het aantal ééntjes tellen in de string "100110101":

<?php
$string 
"100110101";
echo 
substr_count($string1); // geeft 5 weer
?>

Bijdragen :
Er zijn nog geen bijdragen.


 Overzicht
addslashes()
chop()
crypt()
echo()
htmlentities()
htmlspecialchars()
html_entity_decode()
md5()
nl2br()
number_format()
print()
stripslashes()
strip_tags()
strlen()
strpbrk()
strpos()
strrev()
strstr()
strtolower()
strtoupper()
str_repeat()
str_replace()
str_shuffle()
substr()
substr_count()
trim()
ucfirst()
ucwords()
wordwrap()



© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.009s