如何在tinymce表单数据库中设置编码样本内容?

Firstly I store the coding sample content by using tinymce to the database, but when I try to set that data from database to tinymce is not able to execute.

enter image description here

Here are the ways I tried:

    <?php
if (isset($_GET['post'])) {
    echo htmlentities($fetch_results[0]['post_content']);
} else {
}
?>

    tinymce.get("posttextarea").setContent("<?php
if (isset($_GET['post'])) {
    echo htmlentities($fetch_results[0]['post_content']);
} else {
}
?>");

    tinymce.get("posttextarea").getBody().innerHTML = "<?php
if (isset($_GET['post'])) {
    echo $fetch_results[0]['post_content'];
} else {
}
?>";

    <textarea class="form-control" id="posttextarea" name="posttextarea" rows="15" required><?php
if (isset($_GET['post'])) {
    echo $fetch_results[0]['post_content'];
} else {
}
?></textarea>

I only want the same code sample as we first enter in the tinymce, when we retrieved from the database.