Page 1 of 1

Php in html code

Posted: 10 Feb 2017, 20:39
by mlucicom
Hello,
have you any ideea how this work in html without <?php ?> tags?

Code: Select all

<div class="modal-title">{$lng->people_who_like_this}</div>

Php in html code

Posted: 11 Feb 2017, 07:55
by Admin
- The form of the code that you posted it can work with a template system, like php Smarty, which must be included and configured in your php script.
Otherwise, the php code (variables, functions) have to be in <?php tag to can be interpreted by php server.
So, it can work in this way, in php file:

Code: Select all

<div class="modal-title"><?php echo $lng->people_who_like_this; ?></div>
Or like this:

Code: Select all

<?php echo '<div class="modal-title">'. $lng->people_who_like_this .'</div>'; ?>