Php Objective Questions with Answers for written test exams 7

Question 7
Is it possible to pass data from PHP to JavaScript?

A. No, because PHP is server-side, and JavaScript is client-side.

B. No, because PHP is a loosely typed language.

C. Yes, because JavaScript executes before PHP.

D. Yes, because PHP can generate valid JavaScript
Answers 7


Answer D is correct. JavaScript, like HTML, can be dynamically generated by

PHP. Answers A and B are incorrect because the answer is yes. Answer C is incorrect

because PHP executes before JavaScript.

  







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---