+ 1

Can any one tell me how to write JavaScript code inside the php code ?

4th Jun 2018, 3:55 PM
Velakurthy Nikhil.
Velakurthy Nikhil. - avatar
4 Answers
+ 5
JavaScript code can't be written inside <?php ?> element. So, close that element (i.e. add the end tag ?>) at first. Then add <script> element and write JavaScript code inside it. Edit: JavaScript code can be embedded inside <?php ?>. Check @WASP's answer.
4th Jun 2018, 4:22 PM
DAB
DAB - avatar
4th Jun 2018, 4:39 PM
DAB
DAB - avatar
+ 4
Thank you dab and wendy seijas.
4th Jun 2018, 5:35 PM
Velakurthy Nikhil.
Velakurthy Nikhil. - avatar
+ 1
I have written that too but it isn't working . can you help in any other way .
4th Jun 2018, 4:27 PM
Velakurthy Nikhil.
Velakurthy Nikhil. - avatar