Multiple choice technology web technology

The function setcookie( ) is used to:

  1. Declare cookie variables

  2. Store data in cookie variable

  3. Enable or disable cookie support

  4. All of the above

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

The setcookie() function in PHP sends a cookie to the browser, storing data in a cookie variable that will be sent back with subsequent requests. It does not declare variables (that's just variable assignment) nor does it enable/disable cookie support (that's controlled by browser settings).