Uffo Uffo - 6 months ago 22
PHP Question

How to check if an array value exists?

How can I check if

has the value of

$something = array('say' => 'bla', 'say' => 'omg');


Using if?

if(isset($something['say']) && $something['say'] == 'bla') {
    // do something

Btw, you are assigning an value with the key say twice, hence your array will result in an array with only one value.