I am going to presume you mean a html table made in php. answer is just like you would in html. If you have designed the code in html and have it working then to get the same results in php just echo or print the html + javascript. for example if this: <table><tr> <td> <script> my_js_menu(); </script> </td> </tr></table> works in an html page, then to get the same from a php page you can echo the html text of weave the php around the html. inside php it would look like.... or weaving the php around the html would look like... <table><tr> <td> <script> my_js_menu(); </script> </td> </tr></table>