PDA

View Full Version : Echo doesn't work.


Zero Angel
11-16-2002, 07:50 AM
I'm having trouble getting PHP echo to work. I have it set up so that header.php echos a variable defined in index.php (or somepage.php)

For example:
Header.php
.....
<div class="pagetitle">
<?php echo("$pgtitle"); ?>
</div>
.....

index.php
<?php include("header.php");
$pgtitle = "Main Section";
?>
.....

Can someone please tell me what i'm doing wrong? It seemed to work in other pages.

Josh
11-16-2002, 04:16 PM
your include have to put after $pgtitle="main section";
I guess you just forgot it.
HTH

Zero Angel
11-16-2002, 04:40 PM
Sometimes my mistakes are in the most obvious places. I was nearly ripping out my hair here.

Thanks a lot, Josh.