Link to home
Start Free TrialLog in
Avatar of lepirtle
lepirtle

asked on

Assign variable to results of an array

I have a SQL statement which performs correctly and, if I use the below 'echo' statement, I can display the value of that SQL statement (it will be an integer) in my web page. The 'echo' statement is as follows:
<?php while($row = mysql_fetch_array($rankingtable2a))
      {
            echo $row['Ranking'];                        
      }
?>

My question is: how do I assign the value that the above 'echo' statement displays on my web page to a variable so that I may use that variable elsewhere on my page?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Derokorian
Derokorian
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lepirtle
lepirtle

ASKER

Derokorian,
Perfect. Thanks so very much.