0

i will try to create a language converter in using PHP but I don't understand how to I call my js code in PHP class !!!

<?php 
     require_once __DIR__.'/src/Unicode2Bijoy.php';
?>



<script>

function myfunction(){
    var uni1_val = document.getElementById('uni1_val').value;
    console.log(uni1_val);

   var bijoy_result = <?php echo mirazmac\Unicode2Bijoy::convert($str) ?>;
   console.log(bijoy_result);
}
</script>

how can i call this class and result show in my console

1 Answers1

1
echo"<script>myfunction();</script>";
Mahesh
  • 371
  • 3
  • 11