Url decode from database

i have a database which has some messages stored in urlencoded format

i have the following for a dropdown

$sql = "SELECT * FROM logs WHERE id = ".$id."";
    foreach ($db->query($sql) as $row)
        echo ('<option value="'.$row['txtid'].'">'.$row['message'].'</option>');

how would i just urldecode the message row?

Put $row[‘message’] inside urldecode()…

 echo ('<option value="'.$row['txtid'].'">'.urldecode($row['message']).'</option>');

once again thank you very much for your help! :smiley: