gaptrast
Member
- Messages
- 123
- Reaction score
- 0
- Points
- 16
Hello,
my situation is a bit complicated so please try to understand:
I have a page (index.php) that lists all pages and some info about them.
The info of the pages ($description, $title, $tags ...) is stored in files at profiles/.
there are also a file with an array ($pages) with all titles in. - pages.php
This code will write all pages in array $pagetitles' order.
The profiles also have a $rating. What can I do to get the element with best rating first? Sort it?
Thanks ......
my situation is a bit complicated so please try to understand:
I have a page (index.php) that lists all pages and some info about them.
The info of the pages ($description, $title, $tags ...) is stored in files at profiles/.
there are also a file with an array ($pages) with all titles in. - pages.php
Code:
<?php
include 'pages.php'
$num = count($pagetitles);
for ($i=0;$i<$num;$i++){
//get info about $i prank
include ('profiles/'.$pagetitles[$i].'.php');
echo "<div><h2>$title</h2><p>$info</p> ... ... </div>";
}
This code will write all pages in array $pagetitles' order.
The profiles also have a $rating. What can I do to get the element with best rating first? Sort it?
Thanks ......