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
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
Post a Comment