Posso fare echo "<tabel width=\"20px\">";
infatti propio questo intendevo...

echo "<script type=\"text/javascript\">document.getElementById('table').styl e.width=\"$width_table\";</script>";
questo non serve... basta fare come sopra poi da javascript recuperi la proprietà: myTable.width

buona fortuna