list - PHP Order in alphabetical order -


i'm trying make simple alphabetical list order items in database. thing can't figure out how list it.

i same format have on miniclip.com

here's image

alt text

i looked around, couldnt find answer really.

(i finish @ end of each vertical column, except last 1 sure)

any welcome!

in mysql:

select * table order name asc 

in php:

$fruits = array("lemon", "orange", "banana", "apple"); sort($fruits); foreach ($fruits $key => $val) {     echo "fruits[" . $key . "] = " . $val . "\n"; } fruits[0] = apple fruits[1] = banana fruits[2] = lemon fruits[3] = orange 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -