fearfx,
If you are trying to use vBulletin, you can set up a template and use standard <if> conditionals inside templates. Just create a custom template and do normal php calls for calling a template. It should look something like this:
PHP Code:
eval("$variable = " . fetch_template('template_name') . ";");
I believe that is it. But that method will work just as fine as the one that Opserty has provided.