PHP list cookies


 

PHP list cookies

In this tutorial we will see how to use and lists the cookie.We will create an example which displays all the cookies value at a time

In this tutorial we will see how to use and lists the cookie.We will create an example which displays all the cookies value at a time

  • PHP List Cookie are the internet data present on the client machine
  • These Cookies can be enlisted by the $_COOKIE super global variable.
  • $_COOKIE returns the all cookie values in the Array form.


Example of PHP List Cookies

<?php
setcookie("amt",10000);
setcookie("rate",2);
setcookie("time",5);
$cookie
=$_COOKIE;

foreach
($cookie as $key=>$val)
echo
"<br>$key--> $val";
?>


Output of PHP Cookies arraylist
amt--> 10000
rate--> 2
time--> 5 

Ads