ปัญหา <b>[phpBB Debug] PHP Notice</b>: Undefined variable:

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41251
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

ปัญหา <b>[phpBB Debug] PHP Notice</b>: Undefined variable:

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

<b>[phpBB Debug] PHP Notice</b>: in file <b>[ROOT]/includes/mod_md_calendar/function_mdcalendar.php</b> on line <b>127</b>: <b>Undefined variable: topic_list</b><br />
ตัวอย่างโค้ดที่มีปัญหา

โค้ด: เลือกทั้งหมด

while ($row = $db->sql_fetchrow($result)) 
                {
                    $topic_list[] = (int) $row['topic_id'];
                }
                
        return $topic_list;
 
แก้เป็น

โค้ด: เลือกทั้งหมด

      $topic_list = array();
        while ($row = $db->sql_fetchrow($result)) 
                {
                    $topic_list[] = (int) $row['topic_id'];
                }
                
        return $topic_list;
 
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: Amazon [Bot] และบุคลทั่วไป 135