How to check how many times something occurs in a string in PHP

前端 未结 5 1047
眼角桃花
眼角桃花 2020-12-19 18:56

I want to check how many instances of the letter a appears in a certain string.

What is the function for this? I need it to return an integer value.

5条回答
  •  余生分开走
    2020-12-19 19:52

    you can refer to PHP string functions manual to find any function you need, http://php.net/strings

提交回复
热议问题