Değişken php js değer atama Sorunu

0 Cevap php

Nasıl, bir php değişkene bir javascript değer atayabilirsiniz

Bu yapmak istediğim budur:

<?php
    $pag = echo "<script language ='javascript'>var pn =                 document.getElementById('t').value; 
            document.write(pn); </script>";


?> 

Ama hatayı alıyorum gibi: sözdizimi hatası, beklenmedik T_ECHO: hatası Ayrıştırma

or is there any other way to do, but i want to assign that valur to php variable. can somebody help here?

0 Cevap