I have a JavaScript function for scrolling of table when button is click but I have multiple tables in my code and cant use multiple function for each table I want to store the id's of all table in dynamic way using PHP.
<script type="text/javascript">
// Do something in JavaScript
var x = <?php echo $row_[document_id]; ?>;
// etc..
</script>
document_id is were value are accessed dynamically in PHP.