View Single Post
  #1  
Old 01-12-2011, 02:10 AM
Ansem717 Ansem717 is offline
Member
 
Join Date: Jan 2011
Posts: 6
Credits: 1,022
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