<script type="text/javascript"> var jvalue = 'this is javascript value'; <?php $abc = "<script>document.write(jvalue)</script>"?> </script> <?php echo 'php_'.$abc;?>