ihsanberahim
this way could be used when accessing input form $_GET, $_POST, $_REQUEST.
$_GET = [
'hi' => 'wan',
];
if ($v = pos(array_column([$_GET], 'hi'))) {
print_r(["got hi", $v]);
}
if (!($v = pos(array_column([$_GET], 'hi2')))) {
print_r(["hi2 not there", $v]);
}
Array
(
[0] => got hi
[1] => wan
)
Array
(
[0] => hi2 not there
[1] =>
)
=> true