Help with if....elseif...else statement

G&G Moderator
G&G Podcast Host
NonProfit's picture
Joined: 06/06/2007
User offline. Last seen 4 hours 45 min ago.

Hey, I've got a taxonomy list which I would like to alter the output.

Specifically I'd like to render an acronym of my term. (i.e., if my taxonomy term is "Vacation Bible School" I'd like to print "VBS.")

Considering that I have a list of mutually exclusive terms, I'm looking at the if...elseif...else statement:

<?php
$d
=date("D");
if (
$d=="Fri")
  echo
"Have a nice weekend!";
elseif (
$d=="Sun")
  echo
"Have a nice Sunday!";
else
  echo
"Have a nice day!";
?>

How do I pass the Drupal token [term] through this?

Thanks!

-NP