in my case , i need to return value from a ajax page. as i know , there is two way to do it: echo , return.
echo 0;
exit;
or
return 0;
exit;
is there any different between them?
in my case , i need to return value from a ajax page. as i know , there is two way to do it: echo , return.
echo 0;
exit;
or
return 0;
exit;
is there any different between them?
AJAX retrieves the output from another page. echo will output something, but return is for returning a value from a function.
Use echo.