[eluser]brianw1975[/eluser]
with the disclaimer that I have no intimate knowledge of your full code take the following response in a theoretical frame of mind:
ok, your model there is returning the $data array to the controller, the controller is doing one of two things, processing that data into a more formal format (i.e JSON ) or b) passing that info to a view/template file which is then sent to the browser.
I'm willing to bet that you have the 'num' and 'page' reversed in *that* file the one actually creates the string being sent to the browser.
ie you have
Code:
$numcount = $data['page'];
$rowcount = $data['num'];
echo createOutputString($numcount,$rowcout);
instead of
Code:
$numcount = $data['num'];
$rowcount = $data['page'];
echo createOutputString($numcount,$rowcout);
Of course the problem *could* be that the Javascript on the other end is doing something along the same lines (the vars are in the wrong places with each other)