This function is very useful even when you need to format the table (you can use style css) or you want to add links in a field, you can do like this:
$conn = ifx_connect ("dbpath@server","user","pass")OR die ("Could not Connect");
$query = "select fname as Name, '<a href=phppage.php?var='||appno||'>'||sname||'</a>' as Surname from tab02 where sname like '$form_var%'";
/* You can select the name of the column with the 'as' and add the link */
$res = ifx_query($query, $conn);
ifx_htmltbl_result ($res, "border=\"2\"");
ifx_free_result($resultado);
ifx_close($conexion);