[ number - title ]
[ 1 - t1 ]
[ 2 - t2 ]
[ 5 - t3 ]
[ 13 - t4 ]
[ 22 - t5 ]
for this part $next_post = $number+1;
each time i click for example on a button, Go a step forward, But when it reaches $number = 2;
it will give me 404 error since there is no $number = 3;
How am i supposed to type a query to check if the next number doesn't exist, And then jump directly to the nearest number.