Given you can't use loops in vBulletin templates (although it's an asset considered by many other templating systems), you'll have to do this through the PHP file and using an extra template:
PHP Code:
$array_field5 = explode(';', $post['field5']);
foreach ($array_field5 as $key => $post['field5'])
{
if ($post['field5'])
{
eval('$postbit_field5 .= "' . fetch_template('postbit_field5') . '";');
}
}
Template: postbit_field5
Code:
<div class="smallfont">
yada yada: <a href = "../whatever/index.php?q=$post[field5]">whatever</a>
</div>