Previous Thread
Next Thread
Print Thread
Hop To
#30849 11/16/2000 5:46 PM
Anonymous
Unregistered
Anonymous
Unregistered
Just a little recommendation since my version of the ShowMembers script wasn't too popular. Replace the 30 else if's in a row with a neat switch statement. Or at least condense the two sets of else if's into 1 set.
Right now it's..

<pre>
if ($var == 1) {
$i = 11;
}
else if ....
now once this group of else if's are done you have..
if($var == 1) {
$j = 12;
}
else if ....

</pre>

etc.

Doug
<A HREF="http://www.netherworldrpg.net" target="_new">http://www.netherworldrpg.net</A>

#30850 11/16/2000 6:02 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Thanks for the tip. I changed the code to the switch/case option. Much better;).

---

Scream

WWWThreads Developer


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 598 guests, and 134 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)