Possible Duplicate:
Able to see a variable in print_r()'s output, but not sure how to access it in code
I need to work on an existing website with a connected user:
<?php session_start();
print_r($_SESSION); ?>
This code outputs:
Array([%http_user%] => Array
(
[profile_id] => 72
[username] => john
[session_id] => 4ek79umrrpael7vvb4ls3diaq4
)
[registration_invite_code] =>
)
That's what I need. It try to get "john" into my $username
variable:
any idea how ?
I've tried with:
$_SESSION[0]
$_SESSION["%http_user%"]
$_SESSION->username
No way.
Any way how to retrieve this username ?
Thanks