I presume you mean code layout
Its there to make code easier to read.

eg some silly code

for ($x=1;$x<100;$x++) {
        while ($i<50) {
                print $i;

This is more legible than

for ($x=1;$x<100;$x++) {
while ($i<50) {
print $i;

Indentation makes it easier to spot where your code constructs - if ,switch,
while etc start and end.

Hope that explains it a little.  Do a search for code layout in google, and
read up on it, and check out a few examples. There are a number of coding
styles, find one that you like, and be consistent.  Remember to also comment
your code, as well as making it presentable.  If you look back at old code
in a few years time you'll be grateful you did.


-----Original Message-----
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: August 1, 2001 11:42 PM
Subject: [PHP] Hmmm?

Whenever i get a php script off a website why is it that most of the main
parts in the script have a space from the left border. eg



Home of the burning lego man!

ICQ: 115852509
AIM: legokiller666

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to