How can a PHP script reload a page when a button is clicked?

To reload a page when a button is clicked in a PHP script, you can use JavaScript to trigger a page reload upon button click. This can be achieved by adding an onclick event to the button element that calls a JavaScript function to reload the page.

<button onclick="window.location.reload();">Reload Page</button>