Puoi anche usare l'operatore ternario

codice:
echo ($links->Fields('target')!="javascript" ?"target=\"".$links->Fields('target')."\"" :"");