PHP framework queryphp course: Getting started 6 view template

Source: Internet
Author: User
Tags php foreach
PHP framework queryphp Tutorial: how to use the native php code label in the getting started 6 view template? Read the manual :? PHP provides alternative syntaxes for process control, including if, while, for, foreach, and switch. The basic form of the alternative syntax is to replace left curly braces ({) with colons (:) and right curly braces (}) with endif;, endwhile;, endfor ;, endforeach PHP framework queryphp Tutorial: Getting started 6 view template

Use Native php code labels?

Read the manual :?

PHP provides alternative syntaxes for process control, including if, while, for, foreach, and switch.

The basic form of the alternative syntax is to replace left curly braces ({) with a colon (:) and right curly braces (})

Endif;, endwhile;, endfor;, endforeach; and endswitch ;.?

How many other labels can be used?

How can I use url_for () to modify the url function?

Example of using url_for () as a template tag:

  • "> Add New Records
  • "> Data list

Url_for (); adding a true parameter will definitely return a dynamic address.

">

?

Example of using foreach loop for template labels:

?

?

?

CURD demo?

?


?

    ?

  • "> Add New Records
  • ?

  • "> Data list
  • ?

?

?

? ?

? ?

? ?

? ?

? ?

? ?

?

? $ Value):?> Cycle start note: number

?

? ?

? ?

? ?

? ?

? ?

? ?

?

? // The loop ends.

?

? ?

? ?

? ?

? ?

? ?

? ?

?

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Serial NumberClass nameTypeid   
"> Display"> Edit"> Delete
      
?

?

Echo $ pager-> getWholeBar (url_for ("curd/index/page/: page"); // output page navigation: page will be replaced by the page number

?>?

?

?

?


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.