Re: Using PHP/HTML effectivly
| From: | BBC | Date: | Wed, 14 Jun 2006 20:28:14 +0000 |
| Subject: | Re: Using PHP/HTML effectivly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238006@lists.php.net to get a copy of this message | ||
I used many functions as template to change the html syntax.
this is one of the function as a sample:
<?php
function tabletag($border="0",$width="100%",$height="100%",$cellpadding = "0",$cellspacing="0",$style="")
{
print ("<table width=\"$width\" height =\"$height\" border=\"$border\" cellspacing=\"$cellspacing\" cellpadding=\"$cellpadding\" style=\"$style\">");
}
?>
so I don't need to type "<table ....>", just call those functions.
and I don't think it works slowly (cause we just set one function for many tables)
----- Original Message ----- From: "Alex Major" <alex.major@allydm.co.uk>
To: <php-general@lists.php.net>
Sent: Wednesday, June 14, 2006 10:37 AM
Subject: [PHP] Using PHP/HTML effectivly
Hi List, I've been (very slowly) working my way through some basic php, and putting it into my html site. However recently (after trying things out such as cookies or redirects where they have to be set before any page output) I've found that the combination or certainly the way that I'm using php and html together dosn't seem to go too well. I have a question to you experienced PHP developers, how do you mix the html/php together. When I've looked at things like the PHPBB forums, and gone through files they will have absolutly no HTML, just php code. I'm not sure how they manage their page styling, if anyone could explain this too me. At the moment I have things such as <table ...> <?php Some php code making a page header ?> </table> <table ...> <?php Content... ?> </table> I'm sure that I'm not doing it the best possible way, so if anyone has any tips for me.