How to return variable from php to javascript – Jquery ajax
I have this part of javascript, How do I return res.success and res.reload from php? if (res.success) { NioApp.Toast(res.success, 'success'); if (res.reload) { setTimeout(function() { location.reload(); }, 900); } } I tried $return ['res' => 'success'] but didn't work for…