Php questions?, I need help with php. |
Php questions?, I need help with php. |
May 1 2008, 08:47 PM
Post
#1
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 5,880 Joined: Nov 2007 Member No: 593,382 |
Ok because I cant veiw peoples php there are things I cant find out.
So here is my question? Is it better to do this: < ?php include ("header.php"); ? > < ?php include ("nav.php"); ? > < ?php include ("ad.php"); ? > Content < ?php include ("foot.php"); ? > or condense header,nav and ad .php into one file and do this: < ?php include ("tophalf.php"); ? > content < ?php include ("foot.php"); ? > Get what im saying? If you dont can someone just send me a code of what their site looks like with the php. |
|
|
|
![]() |
May 1 2008, 09:42 PM
Post
#2
|
|
![]() torn ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 953 Joined: Oct 2004 Member No: 55,718 |
Technically.......... I don't think it really matters. Because what the PHP basically does (as far as I can understand it) is copy the stuff from the inclusion file and paste it into the html file. For example, if you code a page using PHP and then look at the source code of the page, you won't see "< ?php include ("header.php"); ? >"; you'd see whatever it was you put in header.php.
Soo....if you always have header, nav, and ad together on every single page, then I would suggest combining them into one file, just 'cause it makes the coding neater and simpler. If some pages differ (sometimes you don't have ad, sometimes you don't have nav, etc.) then I don't see anything wrong with having those three parts. |
|
|
|
JosephCohen123 Php questions? May 1 2008, 08:47 PM
XTC I'm not the best with PHP, but I think the fir... May 1 2008, 08:49 PM
SkyliteX i use the second one because gernally I want my na... May 1 2008, 09:53 PM
JosephCohen123 QUOTE(SkyliteX @ May 1 2008, 09:53 PM) i ... May 2 2008, 10:14 AM
SkyliteX QUOTE(JosephCohen123 @ May 2 2008, 10:14 ... May 2 2008, 06:06 PM![]() ![]() |