Friday, 30 September 2016

How to use php varible in javascript.

<?php
$varible = "get any string or fetch any data from database";

   ?>
       <script type="text/javascript">
   var show= "<?php echo strip_tags($varible); ?>";
  alert(show);
  </script>

No comments:

Post a Comment