Следующая строка
Код: Выделить всё
$page = $mysqli->real_escape_string($_GET['page']);
$result=array();
if($stmt = $mysqli->prepare("select * from tbl_newpage where name=?")){
$stmt->bind_param("s", $page);
$stmt->execute();
$result = $stmt->get_result();
while($row = $result->fetch_array()){
$result[] = array($row); //This is where the error appears
echo "hello ";print_r($row);die();
}
$objSmarty->assign("result", $result);
}
Неустранимая ошибка: невозможно использовать объект типа mysqli_result в качестве массива в /var/www/html/examplesite/phpfile.php в строке 22
Подробнее здесь: https://stackoverflow.com/questions/383 ... t-as-array