Home Tutorial Php List PHP list cookies

 
 

PHP list cookies
Posted on: November 2, 2009 at 12:00 AM
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 

Related Tags for PHP list cookies:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.