Home  >  Q&A  >  body text

Prompt for undefined variables: gradeList. How can you solve this problem? I beg you for answers.

)_9}FT@N5UVTBPMW0RB.jpg

轻微强迫症轻微强迫症2360 days ago1697

reply all(2)I'll reply

  • kiraseo

    kiraseo2019-09-09 22:16:13

    //定义可以在前面定义gradeList空数组就可以了
    //例如
    $gradeList=[];

    This will not prompt the error of undefined variables

    reply
    0
  • 手机用户067795602

    手机用户0677956022018-11-10 10:24:53

    You can define the gradeList variable in front

    $gradeList=null It should be because there is no data in your table $grade has no data and no foreach loop is performed

    reply
    0
  • Cancelreply