Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: basics

  1. #11
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I assume &nbsp inserts a the space, but in the 2nd set of code you lost me with for ($i = 0;$i<$max;$i++)

    May I say you guys are freaks, I mean this as a compliment and I am envious of your abilities.

    LOL when I grow up I wanna be a freak too.

  2. #12
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    &nbsp; is the HTML code for a non-breaking space. These are used because normal spaces are treated specially (without text, they're ignored; if more than one space is in a row, all but one are ignored).
    for ($i = 0;$i<$max;$i++)
    This is a for loop, common to most C-like languages (and some that aren't C-like at all). The syntax is:
    Code:
    for(initialiser; condition; incrementor)
    and the meaning is:
    1. Execute the initialiser
    2. Check that condition is true; if not, break from the loop
    3. Execute the following statement or block of code
    4. Execute the incrementor
    5. Repeat from 2
    Any of the three statements can be omitted, but the semicolons must still exist (for(;condition;) is equivalent to while(condition), and for(;;) is equivalent to while(true)).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #13
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Thanks Twey for the explanation.
    for( ; ; ) is equivalent to while(true)).
    Don't try it though, it will never end causing the browser to freeze.
    - Mike

  4. #14
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    There's a timeout defined in php.ini that will kill any script that takes too long to run.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #15
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I guess it's not in my server's settings. I made my browser "freeze" by using a never-ending loop (I set the condition (i < 15) to -15 by mistake).
    - Mike

  6. #16
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have no coding experience what so ever... so even though I really appreciate the explanation it seems may as well be in Chinese. (Which I can't read)

    I am going to keep pushing forward though.

  7. #17
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I am going to keep pushing forward though.
    Good attitude, alot of people just give up (I did for C++ Windows API, lol. Just getting back into it now). Hopefully you'll get where you want to be.
    - Mike

  8. #18
    Join Date
    Jan 2007
    Location
    Close to the fridge
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I just need to push through this, CSS style sheets, and MySql, (which is really kind of boring now because I am not applying it anywhere.) Once I start a site which has a purpose, it will be interesting to see. I know that I don't have a chance in hell though if I don't at least take the time to have a basic understanding.

  9. #19
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I did for C++ Windows API
    I don't blame you.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #20
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Actually, I'm starting to get the hang of it. Given, I also took three hours to read the tutorial, instead of cut/pasting code into CodeBlocks and letting her go
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •