MCQs > IT & Programming > PHP > Which is incorrect way to take a PHP variable named $name and reassign it to a JavaScript variable var name?

PHP MCQs

Which of the following is incorrect way to take a PHP variable named $name and reassign it to a javascript variable var name?

Answer

Correct Answer: <script> var name = <?php echo json_encode($name);?>; </script>

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it