Select Your Style

Choose Color style

Category: Smarty

easy way to create an array and check existing value in smarty template

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation. very useful in MVC architecture and used by many big cms and frameworks like Prestashop script. so to create an array you can declare it like that [crayon-5d139f8bce3cf113430543/] to print out smarty array value you can use the foreach loop [crayon-5d139f8bce3da685681637/] the result will be [crayon-5d139f8bce3dd348518578/] to search value on array you can use this condition [crayon-5d139f8bce3df761411234/]   hope you learn some of smarty with me,feel free to ask for anything about smarty on comments

Read More