Jump to content

rbrady

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rbrady's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. great! it worked, thanks so much  ;)
  2. Hello, I am trying to make tournament brackets, so I need to put all the info into an array so i can call each team name/score when necessary. I currently am using [code]<? $query="SELECT * FROM results"; $result=mysql_query($query); $num=mysql_num_rows($result); $i=0; while ($i < $num) { $team1name[$i]=mysql_result($result,$i,"team1name"); $team2name[$i]=mysql_result($result,$i,"team2name"); $team1score[$i]=mysql_result($result,$i,"team1score"); $team2score[$i]=mysql_result($result,$i,"team2score"); $i++; } ?>[/code] then I do like [code]<? echo($team1name[8]); ?>[/code]or[code]<? echo($team1score[0]."-".$team2score[0]); ?>[/code] but I only get the first letter returned. I am sure its pulling the correct info, and I am sure the full team name is in the db. if i echo [code]mysql_result($result,$i,"team1name");[/code] i get the full team name, but when i try to call [code]<? echo($team1name[8]); ?>[/code] i just get the first letter. any help ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.