Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2011, 02:10 AM
Ansem717 Ansem717 is offline
Member
 
Join Date: Jan 2011
Posts: 6
Credits: 1,012
Ansem717
Default Dechiphering the Adoptables Script

I'm in my learning stages of PHP. I've done a few variable manipulations and within the Adoptables Script, I've been able to add a link to the ACP within the menu bar. Hey, I think it's pretty cool that I can figure out where things are, k?

Thing is, I always am stumped upon this code:
PHP Code:
$i 0
while ($i 1) {

execute certain codes

$i
++

The above confuses me... Why would you execute codes within a while loop if you're only going to do it once? Why don't you just erase the $i variable completely? I physically see no purpose within that while statement. Can someone define this for me?

--Thanks
--Ansem717
Reply With Quote
  #2  
Old 01-15-2011, 06:58 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 32,241
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

There are 3 possible reasons for this. First, is that while statements may actually execute quicker than if the statements were just listed. Sounds funky, but I wouldn't be surprised if that was the case. Second possibility is, as the adoptables script was originally designed be added on to, it may be that those loops are there for future add-ons. Third, is that the programmer was half asleep while typing on his keyboard. :3

Last edited by Kaeliah; 01-15-2011 at 07:02 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading Mysidia Adoptables Script? Rosie-Girl-12- Questions and Supports 25 07-17-2011 11:27 AM
How to change language in PHP Adoptables script? MarDeb Questions and Supports 1 08-17-2009 03:21 PM
Adoptables Script + MyBB Blues Questions and Supports 3 08-05-2009 06:24 PM
What can be done with the PHP Adoptables Script! Seapyramid Suggestions and Feature Requests 11 07-19-2009 11:16 AM
Choosing Adoptables Type [EASY ADOPTABLES SCRIPT ONLY] Ashje Addons/Mods Graveyard 2 05-24-2009 03:17 AM


All times are GMT -5. The time now is 03:48 PM.

Currently Active Users: 596 (0 members and 596 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636