Thread: Array Help
View Single Post
Old 08-25-2009, 10:53 PM   #2 (permalink)
rguy84
The Contributor
 
Join Date: Jun 2009
Location: Seattle, WA
Posts: 76
Thanks: 1
rguy84 is on a distinguished road
Default

You could set up a combobox/textbox that asks for what starting rank you want, and another for how many they want listed.
PHP Code:
$rank $_POST['rankcmb'];
$listing $_POST['listingCmb'];
$i 0;
foreach(
$yourTeamArray as $tRank => $team){
 if(){ 
//need to grab $rank*
  
while($i <= $listing){
    echo 
$team;
  }
 }

*- need to grab $rank and compare it to the keys in the array ($tRank). I am assuming you are building an array the puts the teams in rank order. Once you compare the two, it should put the pointer at that position and just print out the teams...
__________________
Ryan | Blog | Twitter
Send a message via AIM to rguy84 Send a message via MSN to rguy84 Send a message via Yahoo to rguy84 Send a message via Skype™ to rguy84
rguy84 is offline  
Reply With Quote