believeinsharing Posted June 28, 2012 Share Posted June 28, 2012 Hi All, I knw how to code basic php page, bt i need logical help... Lets c I have 3 pages n all has "Banner" as command part, So one option is to repeat 'banner' code on every page... but i wanted to avoid repeating code. I thought to write another PHP file only with banner code in it and 'include' that on every page. My que is, should that banner.php has whole html tags like 'html', 'head', 'title', n 'body'. or simply echo all html tags or just add the code. should banner. php file like <html> <head> <title></title></head> <body> <? echo "This is banner Info"; ?> </body></html> or <? echo "<html> <head> <title></title></head> <body> This is banner Info </body></html>"; ?> or simply <? echo "This is banner Info"; ?> or whats if php file has some php n some html code in it Thanks all Quote Link to comment https://forums.phpfreaks.com/topic/264969-required-logic-while-page-design/ Share on other sites More sharing options...
Barand Posted June 28, 2012 Share Posted June 28, 2012 I'd go with <html> <head> </head> <body> <?php include ('banner.php');?> ... rest of page ... </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/264969-required-logic-while-page-design/#findComment-1357833 Share on other sites More sharing options...
deathadder Posted June 29, 2012 Share Posted June 29, 2012 instead of using <? echo 'banner content'; ?> in the banner.php just use banner content in it with no php tags Quote Link to comment https://forums.phpfreaks.com/topic/264969-required-logic-while-page-design/#findComment-1357925 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.