For some reason I could still not get it work, original values in the array remained unchanged. However, inspired by your first suggestion I was able to decode the offending characters already when creating the array from database search result. Looked like this:
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$rows[0] = html_entity_decode($row[0], ENT_COMPAT, 'UTF-8'); // just an example, actually looped through rows
$result_array[] = $row;
}
(The next step was to figure out how to sort the multidimensional array. Just in case someone googles this up, below is also an example of how to do it -- it may well be piece of cake to the brainiacs among us, but it took me quite a while to figure out. )
foreach ($result_array as $key => $row) {
$sort_by[$key] = $row[0]; // replace [0] with the index to be used for sorting
}
array_multisort($sort_by, SORT_ASC, $result_array);
}
Thank you for your help Zanus, much appreciated!