Home >> PHP >> substr_count() function in PHP

substr_count() function in PHP

The substr_count() function used for count the number of substring occurrences.

Syntax

substr_count(string,substring,start,length)

Example

echo substr_count("Hello dear. How are you","dear");

Output

1

Post Your Comment

Next Questions
substr_replace() function
trim() function
ucfirst() function
ucwords() function
wordwrap() function
array
Array type
Numeric array
Associate array
Multidimensional array
array() function
array_change_key_case() function
array_chunk() function
array_combine() function
array_count_values() function
array_diff() function
array_diff_assoc() function
array_diff_key() function
array_diff_uassoc() function
array_diff_ukey() function
array_fill() function
array_filter() function
array_flip() function
array_intersect() function
array_intersect_assoc() function

Copyright ©2022 coderraj.com. All Rights Reserved.