Ask a simple question about PHP. About the dynamic content of the page!

Source: Internet
Author: User

Dynamic settings are required here

  • Dynamic settings are required here

Dynamic settings are required here

dynamic settings are required here dynamic settings are required here dynamic settings are required here dynamic settings are required here


In the above section, you need to loop the data out of the database n times. and replace "Here needs dynamic settings" with the values in the database.
How do you write in PHP?
Is this part of the text included in And then use echo to output the HTML?
I think there should be a better way.

First time with PHP, please take care of it.



Reply to discussion (solution)

You can use the template engine

is to use Echo to output HTML, there is no better way

Can't you do it without using the template engine?
In addition, what template engine is recommended to use?

Smarty

 
  ' 1 ', ' B ' and ' 2 ', ' c ' = ' 3 ', ' d ' = ' 4 ', ' e ' = ' 5 ', ' f ' = ' 6 ', ' an    array (' a ' = ' = ' A ', ' b ' = = ' B ', ' c ' = ' = ') C ', ' d ' = ' d ', ' e ' = ' e ', ' f ' = ' f '),); for ($i =0, $len =count ($data); $i < $len; $i + +) {?>    

>

>

http://bbs.csdn.net/topics/391013945

Just a buddy's post, take Bishi directly, the specific details of their own Baidu

 
  

>

>

dynamic settings are required here dynamic settings are required here dynamic settings are required here dynamic settings are required here
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.