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.
PHP
strpos($address['name'], 'michael')!==false |
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 4 feedbacks awaiting moderation...
Form is loading...