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

 
 

Share on Google+Share on Google+

PHP list cookies

Ads

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 

Advertisements

Ads

Posted on: November 2, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles