While later. How to assign a value to 1 variables.
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;
That's it. Xuzuning I was surprised. is a variable value.
I'm assigning this value to a str_ireplace.
$s =str_ireplace ("<{aaa}>", $aaa, $STR);//replace content
and then
fopen ("/muban/muluye.html", "R")//Read template normal.
$a =fopen ($shengchenglujin, ' w ');//Set the path, print it, the path can read and write.
Fwrite ($a, $s);//I can't write it in here.
It's weird, what's going on?
That's it. Xuzuning I was surprised. is a variable value.
I'm assigning this value to a str_ireplace.
$s =str_ireplace ("<{aaa}>", $aaa, $STR);//replace content
Seek back:
You echo $s; What do you see?
$s = ";
while ($rs = $result->fetch_assoc ()) {
$s. = "
". $rs [' name ']."";//loop body, loop all articles
}
Echo $s;
Use is_writable to view and write results.
You echo $s; What do you see?
can be displayed normally.
I am in fwrite ($a, $s), before adding $s = "1111"; he can write normally, as the result of referencing while. cannot be written.