我正在尝试创建一个空白数组,以便我可以用循环中从数据库中获取的值填充它。这是我的代码:
page.find(:css, '#uLi').click
然而它给了我这个错误
解析错误:语法错误,意外' [',期待'('在/home/cardplan/public_html/android/FetchUserData.php第26行
第26行就是这个
$stmt = $conn->prepare("SELECT * FROM users WHERE username = ? AND password = ?");
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($id, $name, $email, $username, $password);
$user = array[];
while($stmt->fetch)
{
$user[name] = $name;
$user[email] = $email;
$user[username] = $username;
$user[password] = $password;
}