There is a code:
$string = '524,525,481'; $string_array = explode(',', $string); $q = $db->query("SELECT `tid` FROM `tasks` WHERE `tfrom` = '2' ORDER BY `tid` DESC"); while($d = $db->fetch($q)) { echo $d['tid'].' '; } echo $d['tid'] displays:
529 525 524 486 481
And there is an array of $string_array , in which there are values. How to use it to display the numbers in this order?
524 525 481 529 486