Say I start a PHP script via command line.
Is there a way that PHP can restart/rerun the script from the top via a command inside the PHP script?
<?php
if($something == 'yes')
{
// restart/rerun whole PHP script
}
?>
Say I start a PHP script via command line.
Is there a way that PHP can restart/rerun the script from the top via a command inside the PHP script?
<?php
if($something == 'yes')
{
// restart/rerun whole PHP script
}
?>
As told in comment you can send header.
or if you in the middle of page, you can add <script>
tag with window.location.reload()
there