I have to output $var1. To do that, I return results by using
sendJson($var1);
And this is working fine for me. Now I want to pass two variables $var1 and $var2 using sendJson();. Is it possible?
Put them all inside an array:
sendJson(array($var1, $var2));
Or name them if you don't want to do it index-based:
sendJson(array('var1' => $var1, 'var2' => $var2))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With