i am sending few data as json from php file and it works without any issue. but i want to keep executing php file after json output. if i comment this line then those php codes are executing else they are not executing.
header('Content-Type: application/json', true);
some more code here
exit(json_encode($response));
next is few more php codes which makes database connection and executes.
$res2 = $con->query("SELECT * FROM `tableA` where status='0' order by id desc limit 5");
update code and change the status to 1 if i comment below code
exit(json_encode($response));
then update code works and updates the status to 1 else it is 0. mainly because its a json file as per header and it advises to close the script execution after exit code. i tried toset header as none and echo the output but it does not work. i tried to flush also. it did not work either. any idea will be great