PHPackages                             yakeing/php\_template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. yakeing/php\_template

AbandonedArchivedSymfony-bundle[File &amp; Storage](/categories/file-storage)

yakeing/php\_template
=====================

PHP TEMPLATE ANALYSIS.

v2.3.0(6y ago)3244MPL-2.0PHPPHP &gt;=5.6

Since Aug 7Pushed 5y agoCompare

[ Source](https://github.com/yakeing/php_template)[ Packagist](https://packagist.org/packages/yakeing/php_template)[ Docs](https://github.com/yakeing/php_template)[ RSS](/packages/yakeing-php-template/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (3)Dependencies (1)Versions (3)Used By (0)

Template
========

[](#template)

PHP TEMPLATE ANALYSIS, It can quickly compile the original template and generate HTML display pages.

### Travis CI badge

[](#travis-ci-badge)

[![Travis-ci](https://camo.githubusercontent.com/c1f360a11cd5a2a14dd73f9edbfa0cec78a42dec66ba13538e1a401850bc14fc/68747470733a2f2f6170692e7472617669732d63692e636f6d2f79616b65696e672f7068705f74656d706c6174652e7376673f6272616e63683d6d61696e)](https://travis-ci.com/yakeing/php_template)

### codecov badge

[](#codecov-badge)

[![codecov](https://camo.githubusercontent.com/fa7253f3a713f4a56c9f5d69b73f764f4f734a606c57e57c12c465344264eee1/68747470733a2f2f636f6465636f762e696f2f67682f79616b65696e672f7068705f74656d706c6174652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/yakeing/php_template)

### Github badge

[](#github-badge)

[![Downloads](https://camo.githubusercontent.com/e92848561a6d4e286eda0770fdd5cb2cff3a2016e8e458954a724b9bdf10a012/68747470733a2f2f342e76657263656c2e6170702f6769746875622f646f776e6c6f6164732f79616b65696e672f7068705f74656d706c6174653f69636f6e3d676974687562)](../../)[![Size](https://camo.githubusercontent.com/9cc20ba75fee0a87fbd3d5bc077513a0a1c4dff4369daad10d8ea886a2edf637/68747470733a2f2f342e76657263656c2e6170702f6769746875622f73697a652f79616b65696e672f7068705f74656d706c6174653f69636f6e3d676974687562)](src)[![tag](https://camo.githubusercontent.com/5c5fed6cc377ffe41c20c857e5fbc82535dbe4ce23f94e9cd79dbd37d7103f9f/68747470733a2f2f342e76657263656c2e6170702f6769746875622f7461672f79616b65696e672f7068705f74656d706c6174653f69636f6e3d676974687562)](../../releases)[![license](https://camo.githubusercontent.com/904c4bcc21898764c7b6b7edfba26ea0d5427757cfaee2837ee7bed32124b40b/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c6963656e73652f3535352f4d504c2d322e302f6665376433373f69636f6e3d676974687562)](LICENSE)[![languages](https://camo.githubusercontent.com/5275888fd9cd7a7b85d47b803d247819aa953b27342dfa420173152309ab1a18/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c616e67756167652f3535352f5048502f3334616265663f69636f6e3d676974687562)](../../search?l=php)

### Installation

[](#installation)

Use [Composer](https://getcomposer.org) to install the library. Of course, You can go to [Packagist](https://packagist.org/packages/yakeing/php_template) to view.

```
    $ composer require yakeing/php_template

```

### Debugging Template

[](#debugging-template)

- example

```
    //Template path
    $tpl = new template("/home/www/mould/");

    $tpl->assign("title","I was the title");
    $tpl->assign("arr",array('aaa','bbb','ccc'));

    //The transfer of files at the same time output
    $tpl->GetFile("header.html")->GetFile("index.html")->GetFile("footer.html")->render();
```

### Format

[](#format)

- example

```
    {if $array}...{elseif $array[0]!=null}...{else}...{/if}

```

### foreach

[](#foreach)

- example

```
    {foreach $array as $key => $value}...{$key} => {$value}...{/foreach}
```

### while

[](#while)

- example

```
    {$i = 1}...{while $i < $j}...{$i}...{$i++}...{/while}

```

### for

[](#for)

- example

```
    {for ($i=0;$i
