gpt4 book ai didi

syntax-error - 语法错误,意外的 T_RETURN,期待 T_FUNCTION oop php

转载 作者:可可西里 更新时间:2023-10-31 23:57:45 26 4
gpt4 key购买 nike

<分区>

我收到如上所述的错误。它指的是我的返回声明。有人对此有任何线索吗?!感谢所有帮助!问候!

public function getPosts() {
$result = $this->db->query("SELECT * FROM posts");

$posts = array();
while($posts = $result->fetch_assoc()) {
array_push($posts, new Post($post['id'], $post['created'], $post['author'], $post['title'], $post['body']));
}

}
return $posts;

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com