Page 1 of 1

Session Array Problem ??

Posted: Fri Jul 03, 2009 3:50 pm
by PatelNehal
$_SESSION['domains'] array :

Code: Select all

 
Array
(
    [myname1.co.in] => Array
        (
            [status] => available
            [classkey] => thirdleveldotin
            [Price] => 411.76
            [Currency] => INR
            [timeperiod] => 1
        )
 
    [myname2.com] => Array
        (
            [status] => available
            [classkey] => dotin
            [Price] => 751.26
            [Currency] => INR
            [timeperiod] => 1
        )
)
 
now i want to delete the second record for from the session array how to do it...???

Re: Session Array Problem ??

Posted: Fri Jul 03, 2009 4:07 pm
by jackpf

Code: Select all

unset($_SESSION['myname2.com']);

Re: Session Array Problem ??

Posted: Sat Jul 04, 2009 1:49 am
by PatelNehal
Thank you Mr. jackpf but its not working....!!!!
I am storing an array in session which name is domains and its also contain arrays
$_SESSIONI['domains']

Code: Select all

[domains] => Array
 (
    [myname1.co.in] => Array
         (
             [status] => available
             [classkey] => thirdleveldotin
             [Price] => 411.76
             [Currency] => INR
             [timeperiod] => 1
         )
       [myname2.com] => Array
         (
             [status] => available
             [classkey] => dotin
             [Price] => 751.26
             [Currency] => INR
             [timeperiod] => 1
         )
 )

Re: Session Array Problem ??

Posted: Sat Jul 04, 2009 2:27 am
by requinix
Okay... so...

Code: Select all

unset($_SESSION['domains']['myname2.com']);
How do you expect to develop with PHP if you don't know the language?

Re: Session Array Problem ??

Posted: Sat Jul 04, 2009 2:53 am
by PatelNehal
ya its working now thanks a lot. :lol: