Scusate, ho risolto in questo modo:

Codice PHP:
if (!function_exists('scegli')) {
function 
scegli($val

  global 
$value
  if (
$val == $value[0]) $str "morquota.jpg"
  if (
$val == $value[1] AND $value[4] != '0000-00-00'$str1 "morucsi.jpg"

 
$retval "<img src=\"immagini/$str\" width=\"8\" height=\"8\" border=\"0\" title=\"Moroso quota annuale\"><img src=\"immagini/$str1\" width=\"8\" height=\"8\" border=\"0\" title=\"Moroso quota annuale\">"
return 
$retval;


grazie