So I need a little help, is there a better way to have php wait before executing the next line of code?
I tried:
$response = $_POST[response];
echo "</br>".$response;
if (strpos($response,'no') !== false) {
sleep(2);
echo "</br>";
echo 'Why not?';
}
But this method does not display the
echo "</br>".$response;
before it sleeps. It sleeps for the 2 seconds, then displays the response.
How can I get it to echo $response, then wait 2 seconds before is says "Why Not"
Thank you in advance.