Came across this (old) thread as I also wanted to display the purchase order number in the email message.
The method given embeds php code which means it displays online but not in the email message as the php code output isn't captured.
The following code is all in smarty and works for both onscreen and email
Code:
{if $order.payment_method eq "Purchase Order" and $order.details ne ""}
{foreach from="\n"|explode:$order.details item=i name=foo}
{assign var=pordstuff value = $i}
{if $smarty.foreach.foo.iteration eq 1}
<b> {$pordstuff}</b><br />
{/if}
{/foreach}
{/if}