Check contains a string
In PHP, there is not a simple function similar with C#, such as '"michael".contains("mich")'. However, you can use strpos which is to find the position of the first occurrence of a substring in a string. because if it cannot fund a substring in a string, it will return false. Thus, if it doesn't return false, therefore the substring is existed.
Trackback address for this post
Feedback awaiting moderation
This post has 3 feedbacks awaiting moderation...
Form is loading...