semplicemente così:

Codice PHP:
echo "<td onclick='funzione();'>contenuto</td>"
ciao