Fatal error: Cannot use object of type mysqli_result as array in /home/william/public_html/forums/index.php on line 228

前端 未结 2 905
礼貌的吻别
礼貌的吻别 2021-01-23 16:54

Why won\'t this work? I keep getting that error. // Setup forum topics, post count and last post xxxxx

        $query = array(
            \'SELECT\'    =>         


        
2条回答
  •  别那么骄傲
    2021-01-23 17:48

    Well, you seem to have "something" (maybe $result ?) as an object ; and you are using everything as arrays.

    Maybe you have a way to fetch data as arrays, and not objects ? (Might be a way with the class you are using ? )

    Or, you need to access data as objects, and not arrays ; maybe $result->subject, and not $result['subject'] would do ?

提交回复
热议问题