Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: PHP Question

  1. #11
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    with a switch there are a set of valid values, and that's all, and you can make a default action.
    Same wiht If's

    But if it's faster then go for it.
    Last edited by tesco; 09-04-2005 at 11:56 PM.

  2. Internet, Programming and Graphics   -   #12
    Using a switch statement instead of nested if-else statements is just better programming. It results in better looking code and should be more efficient, but not to the degree that it would actually be noticable for such a small program.

Page 2 of 2 FirstFirst 12

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
  •