Check contains a string
Sep 30, 2014 Announcements [A]
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
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 3 feedbacks awaiting moderation...
Form is loading...