PHP takes a lot of data out of the database and loops it out in the table in the HTML page.
PHP takes a lot of data out of the database and loops it out in the table in the HTML page. Used to be thinkphp frame, there are tag, and that's it. You can't use the thinkphp framework now, use native PHP. How does the data retrieved in the background loop out into the HTML table?
For example, $result to find out the multidimensional array, there are id,name,age three fields. How do I get their corresponding output to an HTML table?
------to solve the idea----------------------
$array = Array (1, 2, 3, 4, 5, 6, 7); foreach ($array as $value) {?>
| |
}?>
Since it is mixed, this should be possible.
or HTML tag processing directly in PHP ~ ~
------to solve the idea----------------------
References:
Quote: References:
$array = Array (1, 2, 3, 4, 5, 6, 7); foreach ($array as $value) {?>
| |
}?>
Since it is mixed, this should be possible.
or HTML tag processing directly in PHP ~ ~
References:
$array = Array (1, 2, 3, 4, 5, 6, 7); foreach ($array as $value) {?>
| |
}?>
Since it is mixed, this should be possible.
or HTML tag processing directly in PHP ~ ~
I have to know this method, a little trouble, there is a simpler way? Just like Thinkphp's. label as
Native PHP does not provide a similar tag, that is provided by the thinkphp framework rather than PHP provided, similar to the smarty tag, is a medium, rather than PHP itself provided, so you can use the Smarty template, which provides similar tags
------to solve the idea----------------------
Not like that, huh? The label boils down to a foreach traversal.