In my code I send $id to Java Script section and it returns the same value inside <p id="retid"></p> and I can't get the value as integer inside $text variable.
        `while ($row = $result->fetch_assoc())
            {
            $id = $row["id"];
            $regname = $row["reg-name"];
            echo '<button class="btnicon btndel" type="button" name="answer" onclick="showDiv('.$id.')"><i class="fa fa-trash"></i>  '.$regname.'</button>';
            }
        } else {
            //header("Location: login.php?Msg=wrongPass"); }
        }
?>
</div>
        <div id="DelMessageDiv" style="display:none;" class="answer_list" >
            <form action="_modify.php" method="get">
                <div id="alerts">
                <?php
                $text = '<p id="retid"></p>';
                    echo $text.'-+-'.strip_tags($text,'<p>').'
                    Are you sure for delete? 
                    <input name="id" type="hidden" value="'.strip_tags($text).'" />                         
                    <button class="btnicon btndel" type="submit" name="operation" value="0+regDelete">Yes Delete</button>
                    ';
                ?>
                </div>
            </form>
        </div>
</div>
<?php include '_footer.php'; ?>
<script src="js/extention/choices.js"></script>
<script>
    const choices = new Choices('[data-trigger]',
    {
      searchEnabled: false
    });
    
    function showDiv(x) {
        document.getElementById('DelMessageDiv').style.display = "block";
        document.getElementById('retid').innerHTML = x;
    }         
</script>`
Thanks for all helps.
