Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Paul M Foster
On Wed, Aug 05, 2009 at 02:55:07PM -0700, Ben Dunlap wrote: > > In my navigation.php include file, I had if ($page = about) echo href > > I changed it to if ($page == about) echo and it suddenly > worked! Imagine > > that... > > Another good case for putting the variable on the right side

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Martin Scotta
Yes, that's a golden rule for a bug free code. The rule shoudl be something like this... Whenever you have a constant value evaluated to a non-constant value put them in the left side of the expression. if( 'constant' == $non_constant ) echo ' variables has that name for anything '; if( fals

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Ben Dunlap
> In my navigation.php include file, I had if ($page = about) echo href > I changed it to if ($page == about) echo and it suddenly worked! Imagine > that... Another good case for putting the variable on the right side of "==": if ("about" == $page) Then if you mis-type "==" as "=", PH

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Allen McCabe
I just wanted to let know I figured out my last issue (last as in, for now). In my navigation.php include file, I had if ($page = about) echo href I changed it to if ($page == about) echo and it suddenly worked! Imagine that... Thanks all for you help, you are celebrities in my book now.