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($ranking table2a))
{
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.
<?php while($row = mysql_fetch_array($ranking
{
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect. Thanks so very much.