While. How to assign a value to one variable. While. How to assign a value to one variable.
Echo"
";
While ($ rs = $ result-> fetch_assoc ()){
Echo"
- ". $ Rs ['name']."
"; // Loop body, loop all articles
}
Echo"
"
Reply to discussion (solution)
$ S = '';
While ($ rs = $ result-> fetch_assoc ()){
$ S. ="
". $ Rs ['name'].""; // Loop body, loop all articles
}
Echo $ s;
Yes. Xuzuning is strange to me. It is actually a variable value.
I assigned this value to a str_ireplace
$ S = str_ireplace ("<{aaa}>", $ aaa, $ str); // replace content
Then
Fopen ("/muban/muluye.html", "r") // The template is read normally.
$ A = fopen ($ shengchenglujin, 'w'); // set the path and print it out. the path can be read and written.
Fwrite ($ a, $ s); // you cannot write it here.
It's strange. what's going on?
Yes. Xuzuning is strange to me. It is actually a variable value.
I assigned this value to a str_ireplace
$ S = str_ireplace ("<{aaa}>", $ aaa, $ str); // replace content
..
You echo $ s; what are there?
$ S = '';
While ($ rs = $ result-> fetch_assoc ()){
$ S. ="
". $ Rs ['name'].""; // Loop body, loop all articles
}
Echo $ s;
Use is_writable to view and write the result.
You echo $ s; what are there?
Can be displayed normally.
I add $ s = "1111" before fwrite ($ a, $ s); and it can be written normally, such as referencing the result of while. Cannot be written.