I have an problem with my cookie section. I want to save and get my cookies but if the cookie isn't set i get and 'underfind index'. So i tried isset() around the cookie but i can't get the value only an bool.
Code:
['gender' => isset($_COOKIE['age']),]
result:
["gender"]=> bool(false)
What i need:
["gender"] => string(1) '1'
var_dump $_COOKIE
["gender"]=> string(1) "1"
Why give isset() an bool as result and not the real value as result.
The problem is, if cookie is set i'll get an value but if the cookie is set and i've the function isset() arround the cookie it'll show an bool and not the real value.