Hi there,
Thanks a lot for the script. However I still am not able to obtain the
lifetime of teh cookie set. Any ideas how this could be
found out.
Thanks in advance
----- Original Message -----
From: Uioreanu Calin <uioreanu@h...>
To: professional php <pro_php@p...>
Sent: Sunday, March 25, 2001 9:52 AM
Subject: [pro_php] Re: COOKIES IN PHP
> > After I set a cookie using the setcookie() function I can get the name
> > of the cookie and the value using the HTTP_COOKIE_VARS global variable.
> > How can I get the value of the expiry date set with the cookie. What I
> > understand is that the http_cookie_vars variable is an array and all
> > parameters of the cookie can be obtained from it but I dont know how to
> > retrieve that data. Any help would be welcome
> >
>
> Try this function. I've found very useful:
>
> function print_array($array)
>
> if(gettype($array)=="array")
>
> echo " <ul>\n";
> while (list($index, $subarray) = each($array) )
>
> echo " <li>$index <code>=></code> \n";
> print_array($subarray);
> echo " </li>\n";
> }
> echo " </ul>\n";
> }
> else
> echo $array;
> }
>
> Regards,
> Calin
>