User Profile

Collapse

Profile Sidebar

Collapse
Ralgoth
Ralgoth
Last Activity: Sep 4 '06, 02:05 AM
Joined: Sep 4 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Ralgoth
    replied to "for" loops with variable names...
    in PHP
    i found the answer...
    Code:
    for($i = 0; $i < 3; $i++){
    	${"Item".$i} = $i;
    }
    See more | Go to post

    Leave a comment:


  • Ralgoth
    started a topic "for" loops with variable names...
    in PHP

    "for" loops with variable names...

    using Flash, I'm sending a bunch of variables to my php script that have ordered names. What I want is to use a "for" loop to identify each variable. This is how I would do it in Flash but don't know how to do it in php...
    Code:
    for(i=0; i<3; i++){
    	this["Item"+i] = i;
    }
    
    // the above code would be identical to typing the following...
    
    Item0 = 0;
    Item1 = 1;
    ...
    See more | Go to post
No activity results to display
Show More
Working...