Is it possible to check the value of a specific key in a PHP array in a 1 IF statement? Right now, so as not to throw an index offset error, I have to check if the key is installed, and then check its value.
if (isset($array[$key])) { if ($array[$key] == $x) {
(sorry, accidentally set! in the first IF initially)
arrays php
David Xia
source share