substr_count

substr_count -- Spočítat počet výskytů řetězce

Popis

int substr_count ( string haystrack, string needle)

substr_count( ) vrací počet výskytů řetězce needle v řetězci haystack string .

Příklad 1 . Ukázka substr_count( )

 
print

 
substr_count(

 
"This

 
is

 
a

 
test"

 
,

 
"is")

 
;

 
/

 
/

 
prints

 
out

 
2