Welcome Guest, Not a member yet? Register   Sign In
Weird pagination problem/puzzle
#1

[eluser]lifegiver36[/eluser]
Here is something I have not been able to figure out. I am using pagination and was having trouble getting it to work. I finally did by retyping the line that I was getting an error on and suddenly it work. I did not change anything in the line so I am not sure why one works but the other one doesn't.

I posted both lines and seeing if maybe someone can tell me what the difference is. When I run the code I do comment one of the lines but right now the top lines works while the bottom one gives me the error: "Warning: Unexpected character in input: '' (ASCII=28) state=0 in C:\...."

To me they look exactly the same but maybe I am missing something. Like I said I did get it to work but it is just bothering me on why one works but he other doesn't.


$data['records'] = $this->db->get('entries', $config['per_page'], $this->uri->segment(3) );
$data['records'] = $this->db->get('entries', $config['per_page'], $this->uri->segment(3) );
#2

[eluser]toopay[/eluser]
What is it, on line which mention by the error?
#3

[eluser]lifegiver36[/eluser]
The top line works while if I comment it out and uncomment the bottom line, it doesn't work. They look exactly the same to me so I dont know what I am not seeing here. This line is being used to in pagination function to get the offset.

So the url would say: example.com/index.php/site/function/20 and that line of code grabs the 20 to use in a function.

I have the code working because the top one works but I just find it weird why the bottom line breaks the program even though its the same.
#4

[eluser]cideveloper[/eluser]
something in your editor is probably adding some erroneous characters.
#5

[eluser]lifegiver36[/eluser]
Is there a way to see that? In the editor I don't see anything weird on that line. I think you may be right though because I have retyped that line a bunch of times and it works every time, except if I uncomment that line and it breaks.




Theme © iAndrew 2016 - Forum software by © MyBB