[ Team LiB ] Previous Section Next Section

Q&A

Q1:

Which are the best start and end tags to use?

A1:

It is largely a matter of preference. For the sake of portability, the standard tags (<?php and ?>) are probably the safest choice. Short tags are enabled by default and have the virtue of brevity, but to promote portability, it might be safest to avoid them.

Q2:

Which editors should I avoid when creating PHP code?

A2:

Do not use word processors that format text for printing (such as Word or OpenOffice). Even if you save files created using this type of editor in plain text format, hidden characters can creep into your code.

Q3:

When should I comment my code?

A3:

This is a matter of preference once again. Some short scripts will be self-explanatory to you, even after a long interval. For scripts of any length or complexity, you should comment your code. This will save you time and frustration in the long run


    [ Team LiB ] Previous Section Next Section