The while in a function that doesn't understand
function wuming () {
Global $mysqli;
$x = "SELECT * from X";
$xun = $mysqli->query ($x);
$i = 0;
while ($x = $xun->fetch_assoc ()) {
echo $a = $x [' Name '], $i + +.
Wumingshengcheng ($a);
}
}
Wumingshengcheng is a 1 function that generates HTML.
Through the passage of $ A to cycle through the 1 columns of the article.
When executing wuming (); When
Inside the while loop the first, executes the Wumingshengcheng ();
In the loop while also echo $a out but does not execute Wumingshengcheng ();
The result of the output is
$a output succeeded
$a build succeeded
$a output succeeded
And then there's no context.
In while, if Wumingshengcheng ($a) is not executed;
The output is complete. For example, there are 5 records in $ A. can be fully output.
Share to:
------Solution--------------------
while ($x = $xun->fetch_assoc ()) {
echo $a = $x [' Name '], $i + +.
Wumingshengcheng ($a);
}
Can this be done?
If it is, that's Wumingshengcheng's problem.
------Solution--------------------
$mysqli->close ();
------Solution--------------------
Then you put out the Wumingshengcheng code.
------Solution--------------------
Didn't you say
The last is $mysqli->close ();It?