Re: $_SESSION variables
am 24.10.2009 13:52:17 von Ashley Sheridan
--=-5V2/a41azGYr5il9GWiK
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Sat, 2009-10-24 at 07:52 -0400, Ron Piggott wrote:
> Instead of doing:
>
> $_SESSION['order'][$reference]['quantity'] = 0;
>
> Is there a way to get remove that part of the array altogether?
>
> Ron
>
>
I don't understand your question..
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-5V2/a41azGYr5il9GWiK--
$_SESSION variables
am 24.10.2009 13:52:37 von Ron Piggott
Instead of doing:
$_SESSION['order'][$reference]['quantity'] = 0;
Is there a way to get remove that part of the array altogether?
Ron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: $_SESSION variables
am 24.10.2009 14:01:15 von Ron Piggott
--=-glLqW3qEE3obcftwysOh
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
I am programming a shopping cart.
So far I have used
$_SESSION['order'][$reference]['quantity'] = 0;
if the customer changed their mind about buying an item. Is there a way
to remove the session variable altogether?
Ron
-----Original Message-----
From: Ashley Sheridan
Reply-to: ash@ashleysheridan.co.uk
To: ron.php@actsministries.org
Cc: PHP General
Subject: Re: [PHP] $_SESSION variables
Date: Sat, 24 Oct 2009 12:52:17 +0100
On Sat, 2009-10-24 at 07:52 -0400, Ron Piggott wrote:
> Instead of doing:
>
> $_SESSION['order'][$reference]['quantity'] = 0;
>
> Is there a way to get remove that part of the array altogether?
>
> Ron
>
>
I don't understand your question..
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-glLqW3qEE3obcftwysOh--
Re: $_SESSION variables
am 24.10.2009 14:08:21 von Phpster
Unset($_SESSION['order'][$reference]['quantity']); will clear the
entire session object
Bastien
Sent from my iPod
On Oct 24, 2009, at 8:01 AM, Ron Piggott
wrote:
>
> I am programming a shopping cart.
>
> So far I have used
>
> $_SESSION['order'][$reference]['quantity'] = 0;
>
> if the customer changed their mind about buying an item. Is there a
> way
> to remove the session variable altogether?
>
> Ron
>
> -----Original Message-----
> From: Ashley Sheridan
> Reply-to: ash@ashleysheridan.co.uk
> To: ron.php@actsministries.org
> Cc: PHP General
> Subject: Re: [PHP] $_SESSION variables
> Date: Sat, 24 Oct 2009 12:52:17 +0100
>
> On Sat, 2009-10-24 at 07:52 -0400, Ron Piggott wrote:
>
>> Instead of doing:
>>
>> $_SESSION['order'][$reference]['quantity'] = 0;
>>
>> Is there a way to get remove that part of the array altogether?
>>
>> Ron
>>
>>
>
>
> I don't understand your question..
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: $_SESSION variables
am 24.10.2009 14:13:41 von Lester Caine
Ron Piggott wrote:
> Instead of doing:
>
> $_SESSION['order'][$reference]['quantity'] = 0;
>
> Is there a way to get remove that part of the array altogether?
unset?
unset($_SESSION['order'][$reference]['quantity']);
Can't seem to reach php.net to confirm, but I use it myself ;)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php