Syntax for PHP in email - 1PUTTS - Aug 21st, 2014
Hi There,
Wondering if anyone can give me a hand here. I'm building the email content and I need to test to see if a field is empty. So something like this:
Code: <?php if (!empty($ANSWER_1)) { ?>
<td>{$ANSWER_1}</td>
<?php } else { ?>
<td> </td>
<?php } ?>
But this doesn't work. Any hints on what might work is very much appreciated.
RE: Syntax for PHP in email - 1PUTTS - Aug 22nd, 2014
OK, I just realized we're using Smarty now. I found the Smarty website and will take a look through the documentation.
RE: Syntax for PHP in email - davidpham - Aug 25th, 2014
If you just use a normal email sending then you don't have to use smarty to save an email template. Sometimes, it will make your code more complex.
RE: Syntax for PHP in email - 1PUTTS - Aug 29th, 2014
(Aug 25th, 2014, 4:54 PM)davidpham Wrote: If you just use a normal email sending then you don't have to use smarty to save an email template. Sometimes, it will make your code more complex.
Thank you, David. I'm actually finding smarty to be quite easy and intuitive for some of the simple things I'm trying to do. Still having some problems but I don't think it's smarty's fault.
|