Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Velocity with PHP

I've been searching Google to try and find if Apache Velocity can be used with PHP but so far I haven't found anything that says it can.

Does anyone know if this is possible or if there is an alternative method.

Basically what I'm trying to do is separate HTML emails out of my PHP code so that I can just have a load of template files and then fire them off when needed. That way I won't have to write long strings of HTML code in a .php file.

Any help would be greatly appreciated.

like image 472
diggersworld Avatar asked Dec 21 '25 06:12

diggersworld


1 Answers

For PHP I am using Smarty templating engine, it has a similar syntax to Velocity and is easy to use. I find {$myvar} to be more readable than <?php echo $myvar; ?>.

like image 77
serg Avatar answered Dec 22 '25 18:12

serg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!