Skip to content

Instantly share code, notes, and snippets.

@MrJSdev
Created April 11, 2017 06:28
Show Gist options
  • Select an option

  • Save MrJSdev/31ee8e1b0c3107f23eca74e1d9007779 to your computer and use it in GitHub Desktop.

Select an option

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/
<?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