Re: php+html mixup in displaying multidimensional array in html tables [message #176859 is a reply to message #176858] |
Sun, 29 January 2012 15:44 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 1/29/2012 9:43 AM, Thomas 'PointedEars' Lahn wrote:
> r(dot)mariotti(at)fdcx(dot)net wrote:
>
>> After developing numerus commercial sites over the past decade+ all
>> the php I've created is by far mostly procedural. I personally never
>> leave php and output my pages with a "print<<<EOD" and the entire
>> page follows, variaables embededded and all.
>> Easy to create, read, follow, maintain, etc.
>
> Except when you want to indent or client-side validate your code. As for
> the former, the EOD (or whatever delimiter you use) must be at the
> *beginning of the line* and must at most followed by `;'. As for the
> latter, a client-side HTML validator will not see the HTML that you put out
> because to it it is PHP.
>
What does indenting have to do with it? And an HTML validator will
definitely see ALL the HTML you put out - because it is sent to the
client.
> In addition, you still would have string escaping issues and difficulties
> with function calls, and it is very inefficient to have PHP string-parse
> large chunks of code that does not need parsing in the first place.
>
What parsing is being done, other than the entire file, which the PHP
interpreter has to do anyway? All PHP is doing is outputting the
strings.
> < http://php.net/manual/en/language.types.string.php#language.types.string.sy ntax.heredoc>
>
> BTDT. Here-doc is tempting as a solution to this problem, but in the long
> run it is more trouble than it is worth.
>
That's your opinion. I've found it quite useful in many instances. It
clarifies the code, making it much easier to understand and maintain.
>
> PointedEars
But then these are typical comments from you.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|