I have try to pass a java script variable to PHP method from this way. But I have done wrong way. How do implement it in a correct way.
<script>
function showMe(id){
var name = <?php findDriverName(id,$drivers); ?>
}
</script>
The variable id is the Java Script Variable I need to pass this to PHP method findDriverName