twistednetadmin said the following on 10/14/05 17:15:
All: Sorry..... I forgot to write what's wrong....stupid me...
Mike:1) I'm not sure how to indent the code...

By putting spaces in front of some of the lines, it will make your code much easier to read and your life much, much easier. At its most basic you want to group lines within braces using indents so that you can easily tell what code is included in a particular loop/conditional statement. Here's a totally nonsensical example:

<?php
if($this==$that) {
    // This is that, do something
    print("<p>This is equal to that</p>\n");

    foreach($otherThing AS $key => $value) {
        // Now we're looping through all the other things
        if($value!=$that) {
            print("<p>That's the wrong value!</p>\n");
        }
    }

    // After looping through all the other things do something else here
    print("<p>Finished with all those other things</p>\n");

}

else {
    // This is NOT that
    print("<p>This is not that... how was I to know?</p>\n");
}
?>


2) I'm using Dreamweaver, but not to write the code for me. I'm not that
lazy :). And that's not the way for me to learn.
It's just rather annoying that all the tutorials I have tried seems to fail.
How can I learn when I'm apparently given the wrong information.

Are you 100% certain that your php install is working properly? What error messages are you receiving?

Make a page with only the following:

<?php phpinfo(); ?>

What do you see when you open it?

- Ben

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to