I am not sure what you mean by "raw" message?
I tried your code and it worked fine, I added a style of 'grey' background and it still displays fine. I ran the code on the W3Schools Editor - Editor
] which uses bootstrap as default and it behaved like expected. The code I tested -
$result = "This is my alert message";
<div id="alert" style = "background-color: grey;">
<?php echo $result;?>