Re: [PHP] Where am i screwing up?

2003-07-31 Thread John Manko
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

Re: [PHP] Where am i screwing up?

2003-07-31 Thread John Manko
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 {

Re: [PHP] Where am i screwing up?

2003-07-31 Thread Curt Zirzow
* 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'])) {

Re: [PHP] Where am i screwing up?

2003-07-31 Thread Ivo Fokkema
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 {

Re: [PHP] Where am i screwing up?

2003-07-31 Thread CPT John W. Holmes
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

Re: [PHP] Where am i screwing up?

2003-07-31 Thread Curt Zirzow
* 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

RE: [PHP] Where am I?

2002-12-17 Thread Martin Towell
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

Re: [PHP] Where am I?

2002-12-17 Thread Jeff
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

RE: [PHP] Where am I?

2002-12-17 Thread Martin Towell
-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

Re: [PHP] Where am I?

2002-12-17 Thread Jeff
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]"