I have an associative array in php name as
$formData =array(
"first"=>"John",
"second"=>"George",
"thirld"=>"Harry",
"fourth"=>"Tom"
);
and a function called isExist($v)
as
function isExist($v) {
if(isset($v)) {
return $v;
}
return "";
}
now i want that this function check either array have index value set or not i.e if I call the function as
echo isExist($formData['apple']);
then it must print an empty string. How to achieve this? Thanks in advanced.