|
Posted by bill on 12/11/06 15:19
see end of post:
Double Echo wrote:
> This is old-style dirty PHP programming. There are a lot of stupid
> programmers
> who mingle/mangle code like this trying to be cute. Instead of some HTML
> with PHP thrown in, reverse it. Have PHP with HTML thrown in. PHP
> should be the control, HTML should not be.
>
> <?php
>
> $var = 1 + 1 ;
>
> print <<<ENDOFHTML
> <html>
> <table>
> <tr>
> <td>
> $var
> </td>
> </tr>
> </table>
>
> ENDOFHTML;
>
> $some_more_php = 2 + 2 ;
>
> print <<<ENDOFHTML
> $some_more_php
> ENDOFHMTL;
>
> ?>
>
> A lot of web servers won't be set up for HTML-with-PHP but if you have
> a web server with PHP enabled, you can always throw in HTML. Programmers
> who mix PHP into HTML just don't know how to program cleanly.
>
> -DE-
>
DE.
for a newbie, who likes your style, please reference or explain
the syntax:
print <<<ENDOFHTML
bill
Navigation:
[Reply to this message]
|