Re: Include Problems

From: Date: Thu, 24 Jul 2003 20:09:36 +0000
Subject: Re: Include Problems
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-156732@lists.php.net to get a copy of this message
I have ran it on my local machine and at my hosting company and it doesn't work for me. I even tried using <?php instaed of <? "Jason Giangrande" <jason@giangrande.org> wrote in message news:1059076430.974.14.camel@dragon.giangrande.org... > Eric, I tried your code on my machine and it seems to print the name of > the variable just fine. The only change I had to make to your code was > add the long PHP tags (i.e. <?php instead of <?) since I have short tags > disabled. Here's the header as I ran it. > > <!--###################################################################--> > <html> > <head> > <title>[Site Name]</title> > </head> > <body> > <table cellpadding="0" cellspacing="0" border="0" > align="left"> > <tr> > <td> > <?php echo $subnav ?> > <?php if($subnav == "home"){ ?><b><?php }?> > <a href="index.php">home</a> > <?php if($subnav == "home"){ ?></b><?php }?> > </td> > </tr> > </table> > <!--####################################################################--> > > It printed home twice once bolded and as a link. I don't think the > problem is your code maybe some weird php.ini setting is set, as to > which one however I couldn't say. > > Jason > > On Thu, 2003-07-24 at 15:44, Eric Fleming wrote: > > Yeah, that is a problem, but I can't even print out the value of the subnav > > variable. It prints nothing when I try to print the variable. > > > > > > "Jason Giangrande" <jason@giangrande.org> wrote in message > > news:1059075127.974.6.camel@dragon.giangrande.org... > > > Eric, If you want to check to see if $subnav is equal to "home" you want > > > to use == and not =. Perhaps this is your problem. > > > > > > Jason > > > > > > On Thu, 2003-07-24 at 15:35, Eric Fleming wrote: > > > > Here is a snippet from the header file. You can see that I am just > > trying > > > > to determine what the value of the subnav variable is set to in order to > > > > determine which navigational link is bold. There are other places the > > > > variable is used, but you can get an idea based on what is below. > > Thanks > > > > for any help. > > > > > > > > <-----incHeader.php------> > > > > > > > > <html> > > > > <head> > > > > <title>[Site Name]</title> > > > > </head> > > > > <body> > > > > <table cellpadding="0" cellspacing="0" > > > > border="0" align="left"> > > > > <tr> > > > > <td> > > > > <? if($subnav = "home"){ ?><b><? > > > > }?><a > > > > href="index.php">home</a><? if($subnav = > > > > "home"){ ?><b><? }?> > > > > </td> > > > > </tr> > > > > </table> > > > > > > > > <-----incHeader.php------> > > > > > > > > > > >

« previous php.general (#156732) next »