Name

substr_count

Synopsis

int substr_count(string string, string search[, int offset[, int length]])

Returns the number of times search appears in string. If offset is provided, the search begins at that character offset for at most length characters, or until the end of the string if length is not provided.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.