use yii\helpers\ArrayHelper; $numbers = [1, 2, 3, 4, 5]; $itemToRemove = 3; $modifiedNumbers = ArrayHelper::remove($numbers, $itemToRemove); // Output: [1, 2, 4, 5] echo json_encode($modifiedNumbers);In this example, the remove method is used to remove the value 3 from the $numbers array. The resulting array, $modifiedNumbers, contains all the other values from $numbers. The ArrayHelper class is a part of the Yii framework's helpers package, which provides a variety of utility classes for common tasks in PHP applications.