Hi
I have a question regarding Ascending Order and Descending Order.
I want to learn how to write a Ascending Order and Descending Order on any list.
For example:
I want to create a booklist and I want to organized it by a library code system.
Category----ID-----Arthur
History-------123----Scholastic
Art------------456----Da Vinci
Math---------789----Newton
This is something I recently learn from another thread I created regarding about if & else statement.
Here is a code:
1) category.php
2) list.php
The 'category' is from the database and the script is called "category.php"
This script is called "list.php" which I'm trying to learn and understand how to pull the info.
( - ) : I'm not to sure how to write it or I don't know what to put in it!
<?php
$orderBy = 'Arthur';
$orderBy = 'Category ';
$orderBy = 'ID';
$orderSort = 'ASC';
$orderSort = 'DESC';
if (-){
$orderBy = (-);
$orderSort = (-) == 'ASC' ? 'ASC' : 'DESC';
}
?>
HTML:
<?php
if ( (-) =='Arthur' and (-) == 'ASC'):
<a href="category.php?ord=Arthur&se=DESC"><span class="style1">Arthur</span></a>
else
<a href="category.php?ord=Arthur&se=ASC"><span class="style1">Arthur</span></a>
endif;
?>
I really apprecaited if someone explain to me how to write it correctly.