I want to display the PHP variable in sweet alert but unable to find the solution, I went through the documentations of sweet alert 2 but couldn't find anything. Can anyone help me?
here's my code
$name = "xyz";
//sweetalert code
echo "<script>";
echo 'setTimeout(function () { swal("Greetings $name!","Thank you for adding your business details.<br>Our admin team will review the same and will publish shortly..!","success");';
echo '}, 100);</script>';