$numbers = [1, 2, 3, 4, 5]; $isFound = \yii\helpers\ArrayHelper::isIn(3, $numbers); // returns true
$fruits = ['apple', 'banana', 'orange', 'mango']; $isFound = \yii\helpers\ArrayHelper::isIn('banana', $fruits); // returns trueIn this example, we created an array of strings and used the `isIn()` method to check whether the value "banana" is present in the array. Since it is, the method returns `true`. These examples use the ArrayHelper class provided by the Yii framework. The `Yii` keyword at the beginning of the method call indicates that the `ArrayHelper` class belongs to the Yii package library.