Multiple choice technology web technology

If you want to find out whether a cookie has been already set which of the following is used

  1. setcookie()

  2. isset()

  3. iscookie()

  4. None of the Above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To check if a cookie has been set, use isset() on the appropriate $_COOKIE superglobal key - for example, isset($_COOKIE['cookiename']). The setcookie() function is used to SET cookies, not check them. There is no iscookie() function in PHP.