PHP calls the database data output result once. The table contains two contents: 11111111111111111111111112222222222222222222222222 PHPcode & lt ;? Php sets the database variable $ db_hostlocalhost; $ db_userroot; $ db_passw123456 for help: PHP calls the database data and the output result is always repeated once.
The table contains two contents:
1111111111111111111111111
2222222222222222222222222
PHP code
Username; $ bbsname = $ mem-> bbsname; $ bbstype = $ mem-> bbstype;?>
.Lingd.cn/"target =" _ blank ">
[
]
The output content is as follows:
11111111111111111111111111
22222222222222222222222222
11111111111111111111111111
22222222222222222222222222
How is this going on?
------ Solution --------------------
Discussion
Reference:
Reference:
Reference:
While ($ mem = mysql_fetch_assoc ($ result) // starts the loop
{
Echo $ men ['username'];
Echo $ men ['bbsname'];
}
Will this be repeated? Look
?>
In this way, the output is blank and cannot be output.
In the Loop var_dump ($ m ......
------ Solution --------------------
Box. innerHTML + = box. innerHTML;
In this case, the value of box. innerHTML is '123 ';
Then, after box. innerHTML + = box. innerHTML;, box. innerHTML is '123 ';