How to retreive a array value in magento

Posted by Fero on Stack Overflow See other posts from Stack Overflow or by Fero
Published on 2009-12-09T14:12:26Z Indexed on 2010/06/16 7:12 UTC
Read the original article Hit count: 218

Filed under:
|

For example i need to retrieve a value from this session. How should i do ? Exactly i need to get the "customer_log_id".

> Array (
>     [core] => Array
>         (
>             [_session_validator_data] => Array
>                 (
>                     [remote_addr] => 127.0.0.1
>                     [http_via] => 
>                     [http_x_forwarded_for] => 
>                     [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
>                 )
> 
>             [session_hosts] => Array
>                 (
>                     [127.0.0.1] => 1
>                 )
> 
>             [messages] => Mage_Core_Model_Message_Collection
> Object
>                 (
>                     [_messages:protected] => Array
>                         (
>                         )
> 
>                     [_lastAddedMessage:protected] => 
>                 )
> 
>             [visitor_data] => Array
>                 (
>                     [] => 
>                     [server_addr] => 2130706433
>                     [remote_addr] => 2130706433
>                     [http_secure] => 
>                     [http_host] => 127.0.0.1
>                     [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
>                     [http_accept_language] =>
> en-us,en;q=0.5
>                     [http_accept_charset] =>
> ISO-8859-1,utf-8;q=0.7,*;q=0.7
>                     [request_uri] => /currentproject/magento/index.php/customer/account/
>                     [session_id] => 34989ee1673caefec0d887dd41198587
>                     [http_referer] => http://127.0.0.1/currentproject/magento/index.php/customer/account/login/
>                     [first_visit_at] => 2009-12-04 11:20:24
>                     [is_new_visitor] => 
>                     [last_visit_at] => 2009-12-04 11:32:26
>                     [visitor_id] => 208
>                     [last_url_id] => 1399
>                     [catalog_compare_items_count] => 0
>                     [do_customer_login] => 
>                     [customer_id] => 1
>                     [customer_log_id] => 8
>                 )
> 
>             [last_url] => http://127.0.0.1/currentproject/magento/index.php/customer/account/index/
>             [just_voted_poll] => 
>         )
> 
>     [_cookie_revalidate] => 1259926524
>     [customer_base] => Array
>         (
>             [_session_validator_data] => Array
>                 (
>                     [remote_addr] => 127.0.0.1
>                     [http_via] => 
>                     [http_x_forwarded_for] => 
>                     [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
>                 )
> 
>             [session_hosts] => Array
>                 (
>                     [127.0.0.1] => 1
>                 )
> 
>             [messages] => Mage_Core_Model_Message_Collection
> Object
>                 (
>                     [_messages:protected] => Array
>                         (
>                         )
> 
>                     [_lastAddedMessage:protected] => 
>                 )
> 
>             [id] => 1
>         )
> 
>     [checkout] => Array
>         (
>             [_session_validator_data] => Array
>                 (
>                     [remote_addr] => 127.0.0.1
>                     [http_via] => 
>                     [http_x_forwarded_for] => 
>                     [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
>                 )
> 
>             [session_hosts] => Array
>                 (
>                     [127.0.0.1] => 1
>                 )
> 
>             [quote_id_1] => 
>         )
> 
>     [catalog] => Array
>         (
>             [_session_validator_data] => Array
>                 (
>                     [remote_addr] => 127.0.0.1
>                     [http_via] => 
>                     [http_x_forwarded_for] => 
>                     [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
>                 )
> 
>             [session_hosts] => Array
>                 (
>                     [127.0.0.1] => 1
>                 )
> 
>             [messages] => Mage_Core_Model_Message_Collection
> Object
>                 (
>                     [_messages:protected] => Array
>                         (
>                         )
> 
>                     [_lastAddedMessage:protected] => 
>                 )
> 
>         )
> 
>     [newsletter] => Array
>         (
>             [_session_validator_data] => Array
>                 (
>                     [remote_addr] => 127.0.0.1
>                     [http_via] => 
>                     [http_x_forwarded_for] => 
>                     [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
>                 )
> 
>             [session_hosts] => Array
>                 (
>                     [127.0.0.1] => 1
>                 )
> 
>         )
> 
> )

Thank n advance

FEro

© Stack Overflow or respective owner

Related posts about php

Related posts about magento