|
Posted by Martin Mouritzen on 11/01/06 19:16
On Wed, 1 Nov 2006 12:48:46 -0600, "Steve" <no.one@example.com> wrote:
>always make sure your html output is sent to the browser in a completely
>well formatted manner. such as indenting parent html nodes and further
>indenting child nodes.
>
>making sure that html output does not require one to wrap text when viewing
>source from a page.
I can see what you mean, but that sounds like an odd guideline to me,
the browser don't care, and the user probably won't care either. :-)
>(these two will save you ooodles of time trying to debug output...it is easy
>to do and makes you look professional in the process).
I find it a big help in debugging output to have a \n after each line
in the HTML, but I still think it's somewhat overkill to indent the
PHP printed HTML with \t.
>as for php, my goal is to have php parse as little as possible. this
>includes using ' instead of " when i am not embedding php variables or
>control characters in a string. ex. echo 'hello world', "hello world\n". as
>a general rule though, you want to keep your php code seperate from your
>html *as much as possible* and only mingle the two when necessary. btw, have
>you heard of "short-tags"? rather than the long, drawn-out method of:
Noteable goal, however it only saves you about a millisecond, I find
it a lot more readable to use ", which is what (most) other
programming languages use for strings (but perhaps I'm biased because
I often write in different languages).
--
best regards,
Martin Mouritzen.
http://www.siteloom.dk
Navigation:
[Reply to this message]
|