I'm new to the web programming area and I'm developing a website in php, the php itself until I understand how it works but as for javascript I'm not sure about when to use it.
For example, and a site screen there is a table with approximately 100 items that are sent by PHP, I had done a pagination to better visualize the data on the page, however I did this by PHP itself and for business reasons was taken the decision to always load the 100 records instead of loading them per page as I had done in php.
In this case I found it interesting to use javascript to manipulate html and make a dynamic paged table, but it is worth mentioning that clicking on this data also fills in inputs that can perform an update via PHP in BD.
Is this kind of approach correct? PHP - > Javascript - > PHP ... When do I know I should use javascript?