include file problems
| From: | rfeather | Date: | Wed, 11 Aug 1999 13:02:09 +0000 |
| Subject: | include file problems | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3335@lists.php.net to get a copy of this message | ||
Not that it's a major problem, but let's say I have a page with an
include file with a function called printHeader(). The include file
is within a subdirectory called "includes". If I format the function
like this
printHeader()
{
print("<table>\n<tr><td>".setFont("Some Text",
"Arial","3","#000000")."</td></tr>\n");
print("</table>\n");
}
It renders it like
<table>
<font face="Arial" size="3" color="#000000">Some
Text</font><tr><td></td></tr>
</table>
Obviously, the parser is ordering the internal function call (setFont())
first.
I can get around this by
function printHeader()
{
echo '
<table>
<tr><td> ';
setFont("Some Text", "Arial","3","#000000");
echo '
</td></tr>
</table>
';
}
but it's kind of a pain...