PHP And HTML Div Tags

masterjake

New Member
Messages
73
Reaction score
0
Points
0
I'm having some real problems. Every time I do any PHP like including files inside a div tag e.g.

Code:
<div class="some****">
<?php
include("include/navigation.php");
?>
</div>

it always screws up the page and stops the html from rendering. I guess I'm going to have to go through and redo the layout using tables instead of divs. Anyone know why this happens though?
 

driveflexfuel

New Member
Messages
159
Reaction score
0
Points
0
Why are you placing the include inside the div. I usually just place the div inside the include.
 

masterjake

New Member
Messages
73
Reaction score
0
Points
0
Because It's how the layout was made, but I'm going to remake it using table's for simplicity. I'll get the same result but no php errors.
 

scopey

New Member
Messages
62
Reaction score
0
Points
0
Check for overlapping tags etc. I'm guessing that the included file has one too many </div> tags.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
check that the navigation.php doesen't got any <html> tgas like the closing tag of html or body, or the starting, like:

<html>, <head>, <body>

unless you want the HTML to start/stop there
 

dickey

New Member
Messages
128
Reaction score
0
Points
0
try changing your include syntax.

PHP:
include ("blah.php");

//to

include "blah.php";

see if this works. if not try require.
 
Top