When $SENDER_LAST_WORD_PLAYED
or $SENDER_LAST_WORD_SCORE
are blank I want the sentence stating "First word played: $SENDER_LAST_WORD_PLAYED for $SENDER_LAST_WORD_SCORE points" to not be printed. So far I've written it so that only if $SENDER_LAST_WORD_PLAYED
is not present 开发者_C百科it will not print the sentence but i would also like to put $SENDER_LAST_WORD_SCORE
validation on it.
Here's my code right now:
{if isset($SENDER_LAST_WORD_PLAYED) && !empty($SENDER_LAST_WORD_PLAYED)}
First word played: '{$SENDER_LAST_WORD_PLAYED|truncate:15:"..."|capitalize}' for %%SENDER_LAST_WORD_SCORE%% points
{else} {/if}
Any ideas?
EDIT Another shot:
{if isset($SENDER_LAST_WORD_PLAYED) && !empty($SENDER_LAST_WORD_PLAYED) && isset(SENDER_LAST_WORD_SCORE) && !empty(SENDER_LAST_WORD_SCORE)}
精彩评论