Created
April 11, 2017 06:28
-
-
Save MrJSdev/31ee8e1b0c3107f23eca74e1d9007779 to your computer and use it in GitHub Desktop.
This is the guide of checking array contains specific word http://extracatchy.net/check-if-array-contains-a-specific-word-in-php/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $students = array("Rahul, Salim, Aftab, Shahnawaz, Faizal, Sameer"); | |
| $stringtocheck = "Aftab"; | |
| if(is_our_student($students, $stringtocheck)) { | |
| echo "It is our student."; | |
| } else { | |
| echo "Uknown child and he/she is not our student."; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment