Notice : Undefined variable when concatenating

后端 未结 1 1662
余生分开走
余生分开走 2020-12-22 04:58

I have been making a script to display users and make changes to their admin privileges.

Here is the code:

    while ($row= mysql_fetch_assoc($query)         


        
相关标签:
1条回答
  • 2020-12-22 05:59

    Just set the variable to an empty string before you use it. You can't use .= on a variable that does not exist yet:

    $insert = "";
    while($row= mysql_fetch_assoc($query)) {
        // ...
        $insert .= '<tr>';
        // ...
    
    0 讨论(0)
提交回复
热议问题