Doubt with search in array [closed]

-1

My question is: How do I perform a search on a key and return its value?

Ex.

$contagem = array('metodologia' => '1','facilidade' => '10')

I would like to search for ease and return the value 10.

Thank you!

    
asked by anonymous 19.09.2016 / 23:27

1 answer

3

You can use the name of the variable followed by the field you want to pick, for example.

$contagem['facilidade']
    
19.09.2016 / 23:48