You could use the PHP in_array function
if( in_array( "bla" ,$yourarray ) )
{
echo "has bla";
}
More Related Contents:
- PHP multidimensional array search by value
- Split a comma-delimited string into an array?
- How to sum all column values in multi-dimensional array?
- How to search by key=>value in a multidimensional array in PHP
- How to convert JSON string to array
- Modify array values in foreach loop
- How to check if PHP array is associative or sequential?
- mysqli bind_param() expected to be a reference, value given
- Build a tree from a flat array in PHP
- PHP sort array by two field values [duplicate]
- Cartesian Product of N arrays
- Convert a comma-delimited string into array of integers?
- Convert array into csv
- How to re-index the values of an array in PHP? [duplicate]
- Convert array of single-element arrays to a one-dimensional array
- Type hinting – specify an array of objects
- Convert an associative array to a simple array of its values in php
- Posting array from form
- CSV to Associative Array
- Check if a specific value exists at a specific key in any subarray of a multidimensional array
- How to pass an array via $_GET in php?
- How to create an empty array in PHP with predefined size?
- Get the maximum value from an element in a multidimensional array? [duplicate]
- Move an array element to a new index in PHP
- PHP get all arguments as array?
- Convert PHP array string into an array
- CMS Routing in MVC
- Recursive array_search
- phpexcel Allowed memory size of 134217728 bytes exhausted [duplicate]
- Check if all values in array are the same