I have a challenge in getting back the array i stored in a session. I stored the array in a array like this
$downlines = '2,3,4,5,6,7,8';
$_SESSION['downline'] = $afrisoft->dbarray("SELECT username, email FROM users WHERE id IN $downlines")
When i print_r the session i get this
Array (
[0] => Array (
[username] => mcbel
[email] => firstmail@gmail.com
)
[1] => Array (
[username] => bimibola
[email] => secondmail@yahoo.com
)
[2] => Array (
[username] => shadie
[email] => thirdmail@gmail.com
)
[3] => Array (
[username] => Hifee
[email] => ife@ife.net
)
)
What i intend to achieve is to get the data stored in ['usernmae']
and ['email']
, however when i try to print_r($_SESSION['downline']['username'])
and print_r($_SESSION['downline']['email'])
it returns no values.
I'll appreciate any help i can get on this.