Subject: PHP

Check if an Element Exists

Write a PHP function to check if a specific value exists in an array without using in_array().

Example:
Input: Array: [1, 2, 3, 4, 5], Value: 3
Output: true

Select file or drag and drop

PNG, JPG, SVG

Preview