Hello, I have a basic design question, in terms of what is "better"
programming.
I have a web site, and am using php pages as includes. some of the php
pages have php tags, and "echo" or "print" the php variables and html.
Like this:
<div id="body">
<?php include("phpinc ludes/server-nav.php"); ?>
</div>
the php page has code like this:
<div id="header">
<ul>
<li class="tab" <?php if ($thisPage=="Ho me")
echo " id=\"currentpag e\""; ?>>
<a href="http://abf966/LBA/index.php">Home </a>
</li>
<li class="tab" <?php if ($thisPage=="In troduction")
echo " id=\"currentpag e\""; ?>>
<a href="http://abf966/LBA/intro.php">Intr oduction</a></li...
etc
is it better (or not) to not only echo divs, etc but to create
everything within php tags like this?
<?php echo ('<h2 class="decco" id="hdrTopic">W ho We Are Not</h2>'); ?>
OR is this really the same thing, but looks different???
thanks again,
ewholz
programming.
I have a web site, and am using php pages as includes. some of the php
pages have php tags, and "echo" or "print" the php variables and html.
Like this:
<div id="body">
<?php include("phpinc ludes/server-nav.php"); ?>
</div>
the php page has code like this:
<div id="header">
<ul>
<li class="tab" <?php if ($thisPage=="Ho me")
echo " id=\"currentpag e\""; ?>>
<a href="http://abf966/LBA/index.php">Home </a>
</li>
<li class="tab" <?php if ($thisPage=="In troduction")
echo " id=\"currentpag e\""; ?>>
<a href="http://abf966/LBA/intro.php">Intr oduction</a></li...
etc
is it better (or not) to not only echo divs, etc but to create
everything within php tags like this?
<?php echo ('<h2 class="decco" id="hdrTopic">W ho We Are Not</h2>'); ?>
OR is this really the same thing, but looks different???
thanks again,
ewholz
Comment