• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Can we define variables in `.tpl` files?

phpsmarty


PHP Snippet 1:

{assign var="foo" value="Foo"}
{assign "foo" "Foo"} {* short-hand *}

The value of $foo is Foo.

Related Snippets

Where do I need to place a hook for phpunit?

Check for PDO Results, If None Display Message, If Yes then Loop Through

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

How to change 'users' auth table and use another instead Laravel

add_action() function in wordpress not working [duplicate]

Prestashop cUrl Login

How to add a sidebar to Woocommerce Shop Page?

PHP header location absolute URL

how to fix Service provider class not found when using repository?

How do I loop through an MS SQL database with VB.NET?

Laravel print last executed SQL query with Query log

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

Doctrine 2 mapping referencing unique key

Get sum of arrays inside array

PHP file_get_contents function

About Contact Privacy policy Terms and conditions