Can someone correct me on this if i'm wrong...
try (meaning, I think that $vars as $keys will put the value into $key,
not the key itself):
foreach ($vars as $key=$value) // clear all previous sessions
{
if(isset($_SESSION['$key']))
{
unset($_SESSION['$key']);
}
}
Ryan A wrote:
Hi,
I
oh, don't forget, '$key' will not get evaluated. $key will.
John Manko wrote:
Can someone correct me on this if i'm wrong...
try (meaning, I think that $vars as $keys will put the value into
$key, not the key itself):
foreach ($vars as $key=$value) // clear all previous sessions
{
* Thus wrote John Manko ([EMAIL PROTECTED]):
Can someone correct me on this if i'm wrong...
try (meaning, I think that $vars as $keys will put the value into $key,
not the key itself):
foreach ($vars as $key=$value) // clear all previous sessions
{
if(isset($_SESSION['$key']))
{
John Manko [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Can someone correct me on this if i'm wrong...
try (meaning, I think that $vars as $keys will put the value into $key,
not the key itself):
foreach ($vars as $key=$value) // clear all previous sessions
{
From: Ryan A [EMAIL PROTECTED]
I am just screwing around and getting used to arrays with a foreach
thanks
to Michael,Jan and Evan from this list and have run into problems.
My requirment is pretty simple (code is below too)
1)unset all the sessions that might have been set with reference to
* Thus wrote Ryan A ([EMAIL PROTECTED]):
foreach ($vars as $key) // clear all previous sessions
{
if(isset($_SESSION['$key']))
{
unset($_SESSION['$key']);
}
}
echo done1; //just checking program execution
No need to loop here, you can use an else statment in the next
loop. And
try doing a phpinfo() , somewhere in there it'll tell you
Martin
-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Where am I?
I'm using PHP 4.0.6. I am developing on Win98SE, and deployed on an
No, I've been looking all day. I can get the information is I run the script
from the root, but what if I am in a sub-dir?
Jeff
Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
try doing a phpinfo() , somewhere in there it'll tell you
Martin
-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 3:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Where am I?
No, I've been looking all day. I can get the information is I run the script
from the root, but what if I am in a sub-dir?
Jeff
Martin Towell
ednesday, December 18, 2002 3:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Where am I?
No, I've been looking all day. I can get the information is I run the
script
from the root, but what if I am in a sub-dir?
Jeff
Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]"
10 matches
Mail list logo