我需要在JavaScript中回显PHP变量[关闭]

My code is

$selectedWallet = $_POST['wallet'];
  <script>
            $(document).ready(function(){
                     var oMain = new CMain({
                                    win_occurrence: 40,
                                    min_bet: 1,
                                    max_bet: 300,
                                    bet_time: 10000,
                                    money: "<?php echo $SelectedWallet; ?>",                 //STARING CREDIT FOR THE USER
                                    blackjack_payout: 1.5,
                                    game_cash: 500,
                                    fullscreen:true,
                                    check_orientation:true,
                                });
</script>

I need to echo a PHP variable in this script i.e. money: "

Use this, you are taking value in one variable and echoing undefined variable.

$selectedWallet = $_POST['wallet'];
 <script>
        $(document).ready(function(){
                 var oMain = new CMain({
                                win_occurrence: 40,
                                min_bet: 1,
                                max_bet: 300,
                                bet_time: 10000,
                                money: '<?php echo $selectedWallet; ?>',                 //STARING CREDIT FOR THE USER
                                blackjack_payout: 1.5,
                                game_cash: 500,
                                fullscreen:true,
                                check_orientation:true,
                            });
 </script>