Method: a::contains

Checks if an array contains a certain string

Info

Syntax

a::contains($array, $search)

Parameters

Return (boolean)

true: the array contains the string, false: it doesn't

Example


$array = array(
  'cat',
  'dog',
  'bird',
);    

if(a::contains($array, 'cat')) echo 'miao';