How to query data and display it in HTML
学容错
学容错 2018-10-17 11:49:37
0
4
910

I’m new to thinkphp, I’m a novice, and I don’t understand it very well

Table name config

Field id, name

Display value in config.html

<td>{$name}</td>

<td>{$name2}</td>

What cannot be displayed is allarray


学容错
学容错

reply all(1)
胤彬-

It is best to paste the code when asking questions

  • reply Can't send it out
    学容错 author 2018-10-17 22:12:50
Summer

What you render to the page is an array

  • reply How to render
    学容错 author 2018-10-17 15:49:06
  • reply Can you help me write down the query code?
    学容错 author 2018-10-17 15:50:08
  • reply Print $name from the controller to the page to see what kind of array this array is. You are getting the data to the page based on the array; for example, $name=array('name'=>'Zhang San'); then you are To render on the page, use <td>{$name['name']}</td>
    Summer author 2018-10-17 18:22:32
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!