PHPcodeforeach ($ listas $ value) {$ this-& gt; output. $ value [q_username]; a $ this-& gt; output. print_r ($ value); B} two output statements. a outputs blank space. B can use the print_r method to output the structure of the array, which has the value and php array output problems.
PHP code
foreach($list as $value){ $this->output .= $value['q_username'];//a $this->output .= print_r($value);// b}
Two output statements. a outputs blank space. B can use the print_r method to output the structure of the array, which has a value and the name is q_username.
Why can't I lose it?
------ Solution --------------------
PHP code
Foreach ($ list as $ key =>$ value) {$ this-> output. = $ value ['Q _ username']; // a $ this-> output. = print_r ($ value); // B}
------ Solution --------------------
Remove $ this-> output. = from the front of the second line.
Foreach ($ list as $ value ){
$ This-> output. = $ value ['Q _ username']; //
Print_r ($ value); // B
}
Echo $ this-> output;
------ Solution --------------------
Discussion
Your $ value is a two-dimensional array (#2)
Use $ this-> output. = $ value ['Q _ username']; of course, it cannot be output.
------ Solution --------------------
Discussion
Reference:
Your $ value is a two-dimensional array (#2)
Use $ this-> output. = $ value ['Q _ username']; of course, it cannot be output.
Sorry... you still have big eyes.