You can get the value of a cookie by its name via the
$_COOKIE superglobal array, like so:
$_COOKIE array you can access all cookies (by their name) that are passed to the current PHP script via HTTP cookies. For example, if you have a cookie called "
foo", you can access it like so:
Please note that if you have dots (
.) or spaces (
$_COOKIE is a superglobal, it is available in all scopes throughout your script.
Hope you found this post useful. It was published . Please show your love and support by sharing this post.