0

Hello guys, is there any way to display variables from highest to lowest without storing them into an array? For example i got multiple variables $numone = 500; $numtwo = 600; $ numthree = 700; and i want to display it out base on their value.

Any help is much appreciated

3
Contributors
4
Replies
5
Views
4 Years
Discussion Span
Last Post by leviathan185
0

@scholarwithfire

Display variables from highest to lowest without array

Do you have a database? If so you can used a database to get the variable without an array.

Read this tutorial on how to get the highest to the lowest number from the database:

http://www.plus2net.com/sql_tutorial/sql_max.php

Edited by LastMitch: grammer

0

@LastMitch

Sorry the variables are not taken directly from database. They are calculations using the data from the database. Is there anyway to display them from highest to lowest without array?

0

@scholarwithfire

Sorry the variables are not taken directly from database. They are calculations using the data from the database. Is there anyway to display them from highest to lowest without array?

You didn't explain it well from your top thread. Explain more about calculations? highest to lowest?

Base on what you mention you need to get the data from the table, calculating the data using php and update the table? Am I correct?

Then you still need a query in order to do that.

Do you have a query that pull the data?

Without a query there's no purpose having this thread if you don't have a query to get the data from the table?

If you have a code for this post it.

Edited by LastMitch: grammer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.