Código PHP:
echo <table width="100%" id="tabla" >
<tr>
<th colspan="12" valign="top"></th>
</tr>
<tr>
<img src="../png/boton_impresora.png" title="Imprimir resultado" border="0" onclick="document.body.innerHTML=this.parentNode.parentNode.parentNode.parentNode.outerHTML;window.print()" onMouseOver=this.style.cursor="pointer">