I have understood a bit more, but not everything. Let me explain:
writenow($p) is a function that writes something about the page (including ratings, description etc.). $p is number in $pages array.
PHP Code:
for ($p=0;$p<$num;$p++){
...
...
$rating[$p] = $therating;
}
This code makes the array $rating with the rating as value, and number as key.
PHP Code:
$sortedByRating=array();
for($i=0;$i<$num;$i++)
{
if(isset($sortedByRating[$rating[$i]]))
{
if(is_array($sortedByRating[$rating[$i]]))
{
$sortedByRating[$rating[$i]][0]=$sortedByRating[$rating[$i]];
}
$sortedByRating[$rating[$i]][/*what to put in here??]=$page[$i];
}
else
{
$sortedByRating[$rating[$i]]=$page[$i];
}
}
krsort($sortedByRating);
What will an example of sortedByRating be?
$sortedByRating[3.56]="computers";
or more than one page with 3.56:
$sortedByRating[3.56][????]="computers";
Thanks for any help.