Quote:
# See if we should any $spacer in connection to this link.
if ($i>0 AND $i<sizeof($pages)-1)
{
|
I'm no PHP guru, however I don't recall ever seeing the word "AND" in a PHP if/then/else statement. Change it to '&&'. In fact, I see 'AND' throughout. Change them all.
You could always wrap your conditions in brackets to isolate them from any other tests. That's what I do, anyway. It makes it easier to read and understand what is being tested.
One thing I do to make sure I'm debugging the correct code (sometimes PHP errors are hard to track because of the output you actually get on your page) is just insert "print "boo"" or whatever to track where in the execution pipeline my code is at the moment. PHP is pretty good at telling you what line number it messed up on, but sometimes is the line you don't have to change to debug your program.