Ivan Ivković Posted March 14, 2012 Share Posted March 14, 2012 When I put PHP code in my site, it doesn't make any extra space, when I include it as a file, it makes one new line. Why? There is no </br> tag anywhere. <div id="left"> <?php include('includes/navigation.php'); ?> </div> This doesn't make any space. <div id="left"> <ul> <li><a href="index.php?nav=list">List Work</a></li> <li><a href="index.php?nav=new">New Done Work</a></li> <li><a href="index.php?action=logout">Logout</a></li> </ul> </div> This does. Even when I make it like this, still does the same. <div id="left"><?php include('includes/navigation.php'); ?></div> Also, Chrome element inspector shows this: <div id="left"> "" <- What's this? :S <ul> <li><a href="index.php?nav=list">List Work</a></li> <li><a href="index.php?nav=new">New Done Work</a></li> <li><a href="index.php?action=logout">Logout</a></li> </ul> </div> Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 14, 2012 Share Posted March 14, 2012 When you do a 'view source' of the page using the php include, what do you see and where exactly is the extra space at? I suspect your navigation.php file is saved with the BOM (Byte Order Mark) characters it is the BOM that is causing the extra space. Quote Link to comment Share on other sites More sharing options...
Ivan Ivković Posted March 14, 2012 Author Share Posted March 14, 2012 TRUE! Working now, thank you. I've set it to UTF-8, now set to option UTF-8 WITHOUT BOM. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.