2013-08-01, 01:40:22
Hopefully this is a cleaner and easier to understand way of doing what I mentioned before (again, using return_i18n_search_results, since its purpose is for custom outputs)
PHP Code:
<?php
// total number of results
$total = 5;
// change parameters (except $max) to ones relevant to your search)
$search = return_i18n_search_results($tags=null, $words=null, $first=0, $max=999, $order=null, $lang=null);
// apply this function as many times as you want to throughly shuffle the results
shuffle($search['results']);
// now limit the results to the max number
$search['results'] = array_slice($search['results'], 0, $total);
// loop through each result and output as desired
foreach ($search['results'] as $result) {
// output
}
?>