我在取回存储在会话中的数组时遇到了挑战。我将数组存储在这样的数组中
$downlines = '2,3,4,5,6,7,8';
$_SESSION['downline'] = $afrisoft->dbarray("SELECT username, email FROM users WHERE id IN $downlines")
当我 print_r 会话时,我得到了这个
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
)
)
我打算实现的是获取存储在['usernmae']
and中的数据['email']
,但是当我尝试时print_r($_SESSION['downline']['username'])
它print_r($_SESSION['downline']['email'])
没有返回任何值。
我会很感激我能得到的任何帮助。