using nl2br after decrypting a record in a mySQL Database

In past, when I want to display a text-content (textarea -> mySQL Database) in HTML, I used nl2br to display the content correctly in HTML.

Now I want to do this after decrypting the database-content, but it doens´t work.

$note = openssl_decrypt($note, "AES-256-CBC", "$encode_key", 0 , "$encode_key");
$outputNote = str_replace("/r/n", "test", "$note");
echo $outputNote;

What´s is wrong in this solution?

ok. Thats the full code generating note

$sql_notes = "SELECT content FROM gn_notes WHERE userid = '$sessionID' ORDER BY tstamp DESC";
$result = mysqli_query($db_link, $sql_notes);
if($number > 0) {
    while ($record = mysqli_fetch_assoc($result)) {
        $date = date("d.m.Y", $record['tstamp']);
        $time = date("H:i", $record['tstamp']);
        $note = $record['content'];
        $encode_key = getValue('encode_key', 'gn_user', $sessionID, $db_link);
        $note = openssl_decrypt($note, "AES-256-CBC", "$encode_key", 0 , "$encode_key");
        echo nl2br($note);

That is the output in the website:
Screenshot ouput