PHP is the simplest and simplest template engine: PHP native template engine
Nov 08, 2016 pm 05:27 PM
<?php $a = array( 'a','b','c' ); require 'template/demo.php';//引用模板 ?>
Template file:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> 模板测试 </title> </head> <body> <?=$a[1]?> <pre class="brush:php;toolbar:false"> <?php print_r($a); ?> <pre class="brush:php;toolbar:false"> </body> </html>
<?php foreach ($a as $value){ ?> 键值: <?=$value?><br /> <?php } ?> //数组的迭代 //smarty: {foreach item=na from=$a key=key} 键值:{$key} <br> {/foreach} //对于PHP程序员那个更好理解呢? //smarty 解析模板还用到正则,PHP的正则效率不会高到哪里去吧...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
4 weeks agoByDDD
R.E.P.O. Save File Location: Where Is It & How to Protect It?
4 weeks agoByDDD
Two Point Museum: All Exhibits And Where To Find Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
