I have a PHP file like this:
<?php
include 'fonctions.php';
echo get_nom_prenom_chauffeur(26);
?>
<body>
<h1 id="header"></h1>
<script>
var result = <?php print_r (get_nom_prenom_chauffeur(26))?>;
//document.getElementById("header").innerHTML = result;
console.log(result);
</script>
</body>
but when it's executed am getting the following error :
althought the PHP function is working and give me the right result but i can't return it or handle it in javascript.
Any help would be appreciated, thanks
Juan Pablo Isaza