Categories
arrays php

How to get array key from corresponding array value?

You can easily get an array value by its key like so: $value = array[$key] but what if I have the value and I want its key. What’s the best way to get it?